# DigitalOcean Documentation - Reference: API (full text) > Concatenated markdown export (index.html.md) for this scope. > Section llms.txt: https://docs.digitalocean.com/reference/api/llms.txt --- Source: https://docs.digitalocean.com/reference/api/create-personal-access-token/ --- title: How to Create a Personal Access Token description: Create a personal access token for use with the DigitalOcean API. product: Reference url: https://docs.digitalocean.com/reference/api/create-personal-access-token/ last_updated: "2026-05-27" --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # How to Create a Personal Access Token Last verified 27 May 2026 To use the DigitalOcean API, you need to generate a personal access token. Personal access tokens function like ordinary OAuth access tokens. You use them to authenticate to the API by including one in a bearer-type `Authorization` header with your request. **Warning**: **Keep your tokens secret.** They function like passwords. Do not hard code your tokens into programs where they may accidentally be released in version control and are harder to rotate. Instead, use environment variables. If a token becomes compromised, delete it to revoke that token’s access. ## About Custom Scopes Previously, DigitalOcean personal access tokens (PATs) [had two scopes](/notes/2024/custom-scope-token-ga/): read access to all team resources or full (read and write) access to all team resources. Custom scopes grant more specific permissions, like only creating Droplets or updating cloud firewalls, which lets you secure your workflows by granting only the permissions the token needs and restricting access to other resources and actions. Generally, the [CRUD scopes](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) map to equivalent actions on the associated kind of resource: - *Create* scope lets you create the resource type and perform additive actions within that resource type. For example, `database:create` lets you create database clusters and create new users or databases within that cluster. - *Read* scope lets you view information about a resource by type and also view information that the resource returns. For example, `app:read` lets you view App Platform apps and their logs. - *Update* scope allows you modify a resource type and perform actions that would otherwise modify a resource. For example, `droplet:update` lets you power a Droplet on or off. - *Delete* scope lets you delete a resource by type and perform actions that delete information about the resource type. For example, `database:delete` lets you delete databases from a database cluster and remove existing users from a database. Each custom scope correlates to one [public API endpoint](https://docs.digitalocean.com/reference/api/reference/index.html.md). ## Creating a Token To generate a personal access token, log in to [the DigitalOcean Control Panel](https://cloud.digitalocean.com?utm_source=docs-agent&utm_medium=md). In the main menu, click **Account**, then click **API** to open the **Applications & API** page on the **Tokens** tab. In the **Personal access tokens** section, click the **Generate New Token** button. ![Create Personal Access Token page showing fields for token name, expiration, and scope selection options including Custom Scopes, Read Only, and Full Access.](https://docs.digitalocean.com/screenshots/api/create-new-pat.f31e0229974379278a5d4d97d37c0c9a7510144c9785175becb4f742d7be6658.png) On the **Create A New Personal Access Token** page, fill out the fields: - **Token name**. Choose a name for the token. This is for your own reference. - **Expiration**. Choose when the token expires. After the interval passes, the token can no longer authenticate you to the API and it disappears from your account. - **Scopes**. Choose the permissions that define which resources and actions the token can access. The available options are based on your [team role](https://docs.digitalocean.com/platform/teams/roles/index.html.md). - **Custom Scopes** lets you select specific scopes from the full list of scopes available to you based on your team role. If a team owner expands the permissions of your team role, a token with custom scopes maintains its original scopes and does not include any new scopes. - **Read Only** grants the token the [`api:read`](https://docs.digitalocean.com/reference/api/scopes/api/read/index.html.md) alias scope, which provides read access to all resources available based on the permissions of your team role. If a team owner expands the read permissions of your team role, a read only token reflects the updated permissions. - **Full Access** grants the token the [`api:write`](https://docs.digitalocean.com/reference/api/scopes/api/write/index.html.md) alias scope, which provides full access to all resources available based on the permissions of your team role. If a team owner expands the permissions of your team role, a full access token reflects the updated permissions. If a team owner restricts the permissions of your team role, those permissions are also no longer available to any existing tokens. You can use the **Quick bulk scope select** to select all scopes for any CRUD action, **Search by resource type** to look for a scope by name, or select and expand sections in the full list: ![Custom scopes selection section with bulk scope filters and expandable resource-type sections.](https://docs.digitalocean.com/screenshots/api/custom-scopes.37613ad745b1b4d433834545d35148efcab51b9922fb90107b2d568b5e4e6217.png) The bottom of the page displays the summary of custom chosen scopes. When you finish selecting your options, click **Generate Token** to create the token and return to the **Applications & API** page. Save the displayed token. For security purposes, the secret is only shown once. You can use tokens with custom scopes in the same way as previous tokens. If you try to use a token to call an endpoint that requires a scope the token does not have, the API returns a 403 Forbidden response. ## Managing Tokens with Custom Scopes In the **Personal access tokens** section, you can view the scopes for existing tokens. ![Personal access tokens table showing token name, number of scopes, creation time, last used status, and expiration date.](https://docs.digitalocean.com/screenshots/api/pats.57d8d742b24a1dc17065fc76bf8189f401067b0954fd12fb6317157da2a38f99.png) You can click the entry in the **Scopes** column to view details about the token’s usage and scopes. In the **…** menu for a token, you can rename, regenerate, or delete the token. ## Limits - You cannot edit the scope of a token after creation. You can rename and regenerate tokens with custom scopes. --- Source: https://docs.digitalocean.com/reference/api/ --- title: API Overview description: The DigitalOcean API lets you programmatically manage Droplets, Kubernetes clusters, databases, and other DigitalOcean resources with conventional … product: Reference url: https://docs.digitalocean.com/reference/api/ last_updated: "2026-11-11" --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # API Overview Last verified 11 Nov 2026 DigitalOcean has five APIs that let you programmatically manage and interact with various products and parts of the platform. ## DigitalOcean API The DigitalOcean API lets you programmatically manage Droplets, Kubernetes clusters, databases, and other DigitalOcean resources with conventional HTTP requests. Official client libraries wrap it for Python ([PyDo](https://docs.digitalocean.com/reference/pydo/index.html.md)), Go ([Godo](https://docs.digitalocean.com/reference/godo/index.html.md)), and TypeScript ([DoTs](https://docs.digitalocean.com/reference/dots/index.html.md)). [DigitalOcean API Reference](https://docs.digitalocean.com/reference/api/reference/index.html.md): Complete reference documentation for the DigitalOcean API, including request samples in cURL, Python, Go, and Ruby. [How to Create a Personal Access Token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md): Create a personal access token for use with the DigitalOcean API. ## Spaces API Spaces provides a RESTful XML API for programmatically managing the data you store through standard HTTP requests. The API is interoperable with Amazon’s AWS S3 API, allowing you to interact with the service with any S3-compatible tools. [Spaces API Reference Documentation](https://docs.digitalocean.com/reference/api/spaces/index.html.md): Complete reference documentation for the Spaces RESTful XML API, interoperable with Amazon S3. [How to Manage Access to DigitalOcean Spaces](https://docs.digitalocean.com/products/spaces/how-to/manage-access/index.html.md): Control access to Spaces buckets using access keys or DigitalOcean teams. [Use DigitalOcean Spaces with AWS S3 SDKs](https://docs.digitalocean.com/products/spaces/reference/aws-sdks/index.html.md): Configure AWS S3 SDKs to work with DigitalOcean Spaces and run compatible S3 API operations. ## OAuth API The OAuth API is a secure method for authenticating users and allowing third-party applications limited access to your servers or DigitalOcean user accounts. [DigitalOcean OAuth API](https://docs.digitalocean.com/reference/api/oauth/index.html.md): Complete reference documentation for the OAuth API, including application registration. ## Metadata API The metadata API allows a Droplet to access information about itself including user data, Droplet ID, datacenter region, and IP addresses. Droplets can access the metadata service using the static, link-local IP address `169.254.169.254`. [DigitalOcean Metadata API Reference](https://docs.digitalocean.com/reference/api/metadata/index.html.md): Complete reference documentation for the Metadata API for Droplets. [How to Access Information about a Droplet using the Metadata API](https://docs.digitalocean.com/products/droplets/how-to/access-metadata/index.html.md): Use the Droplet metadata service to programmatically query a Droplet for information about itself. ## Documentation Search API The Documentation Search API returns ranked DigitalOcean documentation pages for a keyword query as JSON, with no authentication. It is in public preview and uses the same index as the Documentation MCP server. [Documentation Search API](https://docs.digitalocean.com/reference/mcp/documentation-search-api/index.html.md): Search DigitalOcean documentation over HTTPS without MCP or authentication, using the same index as the Documentation MCP server. ## Latest Updates ### 19 November 2026 - Released [v2.7.0 of doctl](https://github.com/digitalocean/doctl/releases/tag/v2.7.0), the official DigitalOcean CLI. This release adds an `--enable-insights-logs` flag to [`doctl registries create`](https://docs.digitalocean.com/reference/doctl/reference/registries/create/index.html.md) and [`doctl kubernetes cluster create`](https://docs.digitalocean.com/reference/doctl/reference/kubernetes/cluster/create/index.html.md) for sending a new registry’s or cluster’s logs to [Insights](https://docs.digitalocean.com/products/insights/index.html.md), and a `--turn-type` flag to `doctl evaluation metric list` and `doctl evaluation custom-metric create` for single-turn and multi-turn metrics. ### 17 November 2026 - Released [v2.6.0 of doctl](https://github.com/digitalocean/doctl/releases/tag/v2.6.0), the official DigitalOcean CLI. This release adds a [`doctl compute microvm update`](https://docs.digitalocean.com/reference/doctl/reference/compute/microvm/update/index.html.md) command for [changing a running or paused MicroVM’s name, tags, and auto-pause idle timeout](https://docs.digitalocean.com/products/microvms/how-to/update/index.html.md). ### 13 November 2026 - Released [v2.5.0 of doctl](https://github.com/digitalocean/doctl/releases/tag/v2.5.0), the official DigitalOcean CLI. This release adds a [`doctl harness-runtime regions list`](https://docs.digitalocean.com/reference/doctl/reference/harness-runtime/regions/list/index.html.md) command, support for the MiniMax Code harness, and a `--spec` flag for [`doctl harness-runtime update`](https://docs.digitalocean.com/reference/doctl/reference/harness-runtime/update/index.html.md) that changes an existing session’s tools, environment variables, and secrets. For more information, see [the full release notes](https://docs.digitalocean.com/release-notes/index.html.md). --- Source: https://docs.digitalocean.com/reference/api/metadata/dns/ --- title: DNS description: Each Droplet's network configuration contains the IP addresses of DNS resolvers that the Droplet uses to locate and connect to hostnames on the … product: Reference url: https://docs.digitalocean.com/reference/api/metadata/dns/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # DNS Generated on 4 Dec 2026 Each Droplet's network configuration contains the IP addresses of DNS resolvers that the Droplet uses to locate and connect to hostnames on the internet. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get DNS Attributes Index](#getDns) - **GET** [Get DNS Nameservers](#getDnsNameservers) ## GET Get DNS Attributes Index `/metadata/v1/dns/` An index of DNS attributes. ##### Request: `/metadata/v1/dns/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/dns/" ``` #### Responses 200 Success ##### Response ``` nameservers ``` * * * ## GET Get DNS Nameservers `/metadata/v1/dns/nameservers` The nameserver entries that are added to a Droplet's `/etc/resolv.conf` file during creation. ##### Request: `/metadata/v1/dns/nameservers` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/dns/nameservers" ``` #### Responses 200 Success ##### Response ``` 2001:4860:4860::8844 2001:4860:4860::8888 8.8.8.8 ``` * * * --- Source: https://docs.digitalocean.com/reference/api/metadata/droplet-properties/ --- title: Droplet Properties description: Returns general information about the Droplet, including the Droplet's region, hostname, and ID. product: Reference url: https://docs.digitalocean.com/reference/api/metadata/droplet-properties/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Droplet Properties Generated on 4 Dec 2026 Returns general information about the Droplet, including the Droplet's region, hostname, and ID. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Droplet's Metadata](#getMetadata) - **GET** [Get Metadata Index](#getMetadataIndex) - **GET** [Get Droplet ID](#getDropletId) - **GET** [Get Hostname](#getHostname) - **GET** [Get User Data](#getUserData) - **GET** [Get Vendor Data](#getVendorData) - **GET** [Get Public Keys](#getPublicKeys) - **GET** [Get Region](#getRegion) ## GET Get Droplet's Metadata `/metadata/v1.json` Returns the entire contents of Droplet's matadata, in JSON. This endpoint is unique because it returns all of the metadata at once, instead of individual metadata items. ##### Request: `/metadata/v1.json` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1.json" ``` #### Responses 200 A JSON array of Droplet metadata. 301 If you access an index endpoint but forget to add the trailing slash, you will receive a `301 Moved Permanently` response. 404 If you access an endpoint that does not exist, you will receive a `404 Not Found` response. Resolve this by using an existing endpoint. ##### Response **200** ```json [ { "dns": { "nameservers": [ "2001:4860:4860::8844", "2001:4860:4860::8888", "8.8.8.8" ] }, "droplet_id": 2756294, "features": { "dhcp_enabled": true }, "hostname": "sample-droplet", "interfaces": { "private": [], "public": [] }, "public_keys": [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcbi6cygCUmuNlB0KqzBpHXf7CFYb3VE4pDOf/RLJ8OFDjOM+fjF83a24QktSVIpQnHYpJJT2pQMBxD+ZmnhTbKv+OjwHSHwAfkBullAojgZKzz+oN35P4Ea4J78AvMrHw0zp5MknS+WKEDCA2c6iDRCq6/hZ13Mn64f6c372JK99X29lj/B4VQpKCQyG8PUSTFkb5DXTETGbzuiVft+vM6SF+0XZH9J6dQ7b4yD3sOder+M0Q7I7CJD4VpdVD/JFa2ycOS4A4dZhjKXzabLQXdkWHvYGgNPGA5lI73TcLUAueUYqdq3RrDRfaQ5Z0PEw0mDllCzhk5dQpkmmqNi0F sammy@digitalocean.com" ], "region": "nyc3", "vendor_data": "#cloud-config\ndisable_root: false\nmanage_etc_hosts: true\n\ncloud_config_modules:\n - ssh\n - set_hostname\n - [ update_etc_hosts, once-per-instance ]\n\ncloud_final_modules:\n - scripts-vendor\n - scripts-per-once\n - scripts-per-boot\n - scripts-per-instance\n - scripts-user\n" } ] ``` **301** ``` 301 Moved Permanently ``` **404** ``` 404 Not Found ``` * * * ## GET Get Metadata Index `/metadata/v1/` The top-level metadata index. This index can be navigated to find all available Metadata endpoints. ##### Request: `/metadata/v1/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/" ``` #### Responses 200 A list of metadata endpoints. ##### Response ``` id hostname user-data vendor-data public-keys region interfaces/ dns/ floating_ip/ reserved_ip/ tags/ features/ virtual_ips/ ``` * * * ## GET Get Droplet ID `/metadata/v1/id` The Droplet's unique identifier. This is automatically generated upon Droplet creation. ##### Request: `/metadata/v1/id` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/id" ``` #### Responses 200 The Droplet's ID as an integer. ##### Response ``` 2756294 ``` * * * ## GET Get Hostname `/metadata/v1/hostname` The Droplet's hostname, as specified by the user during Droplet creation. ##### Request: `/metadata/v1/hostname` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/hostname" ``` #### Responses 200 The Droplet's hostname as plain text. ##### Response ``` sample-droplet ``` * * * ## GET Get User Data `/metadata/v1/user-data` The user data that was provided by the user during Droplet creation. User data can contain arbitrary data for miscellaneous use or, with certain Linux distributions, an arbitrary shell script or cloud-config file that will be consumed by a variation of cloud-init upon boot. At this time, cloud-config support is included with Ubuntu 14.04, and CentOS 7 images on DigitalOcean. ##### Request: `/metadata/v1/user-data` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/user-data" ``` #### Responses 200 The user data provided as plain text. ##### Response ``` #! /bin/bash echo "Data from user" ``` * * * ## GET Get Vendor Data `/metadata/v1/vendor-data` Vendor-provided data that can be used to configure Droplets upon their creation. This is similar to user data, but it is provided by DigitalOcean instead of the user. ##### Request: `/metadata/v1/vendor-data` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/vendor-data" ``` #### Responses 200 The vendor data provided as plain text. ##### Response ``` #cloud-config disable_root: false manage_etc_hosts: true cloud_config_modules: - ssh - set_hostname - [ update_etc_hosts, once-per-instance ] cloud_final_modules: - scripts-vendor - scripts-per-once - scripts-per-boot - scripts-per-instance - scripts-user ``` * * * ## GET Get Public Keys `/metadata/v1/public-keys` Public SSH key(s) that were added to the Droplet's root user's `authorized_keys` file during Droplet creation. ##### Request: `/metadata/v1/public-keys` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/public-keys" ``` #### Responses 200 The Droplet's public key in plain text. ##### Response ``` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcbi6cygCUmuNlB0KqzBpHXf7CFYb3VE4pDOf/RLJ8OFDjOM+fjF83a24QktSVIpQnHYpJJT2pQMBxD+ZmnhTbKv+OjwHSHwAfkBullAojgZKzz+oN35P4Ea4J78AvMrHw0zp5MknS+WKEDCA2c6iDRCq6/hZ13Mn64f6c372JK99X29lj/B4VQpKCQyG8PUSTFkb5DXTETGbzuiVft+vM6SF+0XZH9J6dQ7b4yD3sOder+M0Q7I7CJD4VpdVD/JFa2ycOS4A4dZhjKXzabLQXdkWHvYGgNPGA5lI73TcLUAueUYqdq3RrDRfaQ5Z0PEw0mDllCzhk5dQpkmmqNi0F sammy@digitalocean.com ``` * * * ## GET Get Region `/metadata/v1/region` The region code of where the Droplet resides. ##### Request: `/metadata/v1/region` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/region" ``` #### Responses 200 The Droplet's region as plain text. ##### Response ``` nyc3 ``` * * * --- Source: https://docs.digitalocean.com/reference/api/metadata/features/ --- title: Features description: Droplets have features that can be enabled depending on the Droplet's configuration. product: Reference url: https://docs.digitalocean.com/reference/api/metadata/features/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Features Generated on 4 Dec 2026 Droplets have features that can be enabled depending on the Droplet's configuration. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Available Features](#getFeatures) - **GET** [Get DHCP Status](#getFeaturesDhcp) - **GET** [Get Scheduled Migrations](#getScheduledMigrations) ## GET Get Available Features `/metadata/v1/features/` An index of DigitalOcean features available to the Droplet. ##### Request: `/metadata/v1/features/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/features/" ``` #### Responses 200 Success ##### Response ``` dhcp_enabled ``` * * * ## GET Get DHCP Status `/metadata/v1/features/dhcp_enabled` Whether or not DHCPv4 and DHCPv6 are available to the Droplet. ##### Request: `/metadata/v1/features/dhcp_enabled` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/features/dhcp_enabled" ``` #### Responses 200 Success ##### Response ``` true ``` * * * ## GET Get Scheduled Migrations `/v1/maintenance_event` Returns the string `live_migrate` at least 10 minutes before a scheduled migration. If the request returns a blank string, we have not scheduled the Droplet for a migration. ##### Request: `/v1/maintenance_event` ### cURL ```bash curl -X GET \ "http://169.254.169.254/v1/maintenance_event" ``` #### Responses 200 Success ##### Response ``` live_migrate ``` * * * --- Source: https://docs.digitalocean.com/reference/api/metadata/floating-ips/ --- title: Floating IPs description: DigitalOcean [Reserved IP addresses](https://www.digitalocean.com/docs/networking/floating-ips/) are publicly-accessible static IP addresses that you … product: Reference url: https://docs.digitalocean.com/reference/api/metadata/floating-ips/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Floating IPs Generated on 4 Dec 2026 DigitalOcean [Reserved IP addresses](https://www.digitalocean.com/docs/networking/floating-ips/) are publicly-accessible static IP addresses that you can assign to Droplets and instantly remap between other Droplets in the same datacenter. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Floating IP Index](#getFloatingIp) - **GET** [Get Floating IPv4 Attributes Index](#getFloatingIpIpv4) - **GET** [Get Floating IPv4 Status](#getFloatingIpIpv4Active) - **GET** [Get Floating IPv4 Address](#getFloatingIpIpv4Address) ## GET Get Floating IP Index `/metadata/v1/floating_ip/` An index of IPv4 Floating IPs. ##### Request: `/metadata/v1/floating_ip/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/floating_ip/" ``` #### Responses 200 Success ##### Response ``` ipv4/ ``` * * * ## GET Get Floating IPv4 Attributes Index `/metadata/v1/floating_ip/ipv4/` An index of IPv4 Floating IP attributes. ##### Request: `/metadata/v1/floating_ip/ipv4/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/floating_ip/ipv4/" ``` #### Responses 200 Success ##### Response ``` active ip_address ``` * * * ## GET Get Floating IPv4 Status `/metadata/v1/floating_ip/ipv4/active` Displays true if a Floating IP is currently assigned to the Droplet and false if it is not. ##### Request: `/metadata/v1/floating_ip/ipv4/active` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/floating_ip/ipv4/active" ``` #### Responses 200 Success ##### Response ``` true ``` * * * ## GET Get Floating IPv4 Address `/metadata/v1/floating_ip/ipv4/ip_address` The IP address of the Floating IP that is currently assigned to the Droplet. ##### Request: `/metadata/v1/floating_ip/ipv4/ip_address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/floating_ip/ipv4/ip_address" ``` #### Responses 200 Success ##### Response ``` 45.55.96.17 ``` * * * Learn more: [Reserved IPs Pricing](https://docs.digitalocean.com/products/networking/reserved-ips/details/pricing/index.html.md), [How to Send Outbound Traffic Over a Reserved IP](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/index.html.md), [How to Reassign or Unassign Reserved IPs](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/modify/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/metadata/ --- title: DigitalOcean Metadata API Reference description: Complete reference documentation for the Metadata API for Droplets. product: Reference url: https://docs.digitalocean.com/reference/api/metadata/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # DigitalOcean Metadata API Reference Generated on 16 Feb 2021 The DigitalOcean Droplet Metadata API allows Droplets to access its metadata. Examples of available Droplet metadata include user-provided data (`user-data`), Droplet ID, data center region, IP addresses, and tags. Aside from allowing an easy way for a user to look-up data about a Droplet, metadata can be used to configure a Droplet and its applications. *The full OpenAPI specification is available on [GitHub](https://github.com/digitalocean/openapi).* [DNS 2 endpoints](https://docs.digitalocean.com/reference/api/metadata/dns/index.html.md) [Droplet Properties 8 endpoints](https://docs.digitalocean.com/reference/api/metadata/droplet-properties/index.html.md) [Features 3 endpoints](https://docs.digitalocean.com/reference/api/metadata/features/index.html.md) [Floating IPs 4 endpoints](https://docs.digitalocean.com/reference/api/metadata/floating-ips/index.html.md) [Network Interfaces 16 endpoints](https://docs.digitalocean.com/reference/api/metadata/network-interfaces/index.html.md) [Reserved IPs 7 endpoints](https://docs.digitalocean.com/reference/api/metadata/reserved-ips/index.html.md) [Tags 1 endpoint](https://docs.digitalocean.com/reference/api/metadata/tags/index.html.md) [Virtual IPs 3 endpoints](https://docs.digitalocean.com/reference/api/metadata/virtual-ips/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/metadata/network-interfaces/ --- title: Network Interfaces description: Droplets use public and [private network](https://www.digitalocean.com/docs/networking/vpc/) interfaces to connect to the internet and other … product: Reference url: https://docs.digitalocean.com/reference/api/metadata/network-interfaces/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Network Interfaces Generated on 4 Dec 2026 Droplets use public and [private network](https://www.digitalocean.com/docs/networking/vpc/) interfaces to connect to the internet and other DigitalOcean resources. Each interface contains various properties, including the Droplet's IP address, gateway IP, and netmask. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Network Interface Index](#getInterfaces) - **GET** [Get Public Interface Index](#getInterfacesPublic) - **GET** [Get Public Interface Attributes Index](#getInterfacesPublicIndex) - **GET** [Get Public Interface's MAC Address](#getInterfacesPublicMac) - **GET** [Get Network Interface's Type](#getInterfacesPublicType) - **GET** [Get Public Interface's IPv4 Attributes](#getInterfacesPublicIpv4) - **GET** [Get Public Interface IPv4 Address](#getInterfacesPublicIpv4Address) - **GET** [Get Public Interface IPv4 Netmask](#getInterfacesPublicIpv4Netmask) - **GET** [Get Public Interface Gateway Address](#getInterfacesPublicIpv4Gateway) - **GET** [Get IPv6 Network Interfaces Index](#getInterfacesIpv6) - **GET** [Get Public Interface IPv6 Address](#getInterfacesIpv6Address) - **GET** [Get Public Interface's IPv6 CIDR](#getInterfacesIpv6Cidr) - **GET** [Get Public Interface's IPv6 Gateway Address](#getInterfacesIpv6Gateway) - **GET** [Get IPv4 Anchor Attributes Index](#getInterfacesIpv4AnchorIndex) - **GET** [Get Anchor IPv4 Address](#getInterfacesIpv4AnchorAddress) - **GET** [Get Anchor IPv4 Netmask](#getInterfacesIpv4AnchorNetmask) ## GET Get Network Interface Index `/metadata/v1/interfaces/` An index of all network interfaces by type, e.g. "public" and "private". ##### Request: `/metadata/v1/interfaces/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/" ``` #### Responses 200 The available interfaces as plain text. ##### Response ``` public/ private/ ``` * * * ## GET Get Public Interface Index `/metadata/v1/interfaces/public/` An enumerated index of all public network interfaces that are of the specified interface type. ##### Request: `/metadata/v1/interfaces/public/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/" ``` #### Responses 200 An enumerated list of public interfaces as plain text. ##### Response ``` 0/ ``` * * * ## GET Get Public Interface Attributes Index `/metadata/v1/interfaces/public/0/` An index of the attributes of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/" ``` #### Responses 200 An index of the Droplet's public interfaces as a plain-text list. ##### Response ``` mac type ipv4/ ipv6/ ``` * * * ## GET Get Public Interface's MAC Address `/metadata/v1/interfaces/public/0/mac` The MAC address of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/mac` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/mac" ``` #### Responses 200 The Droplet's MAC address as plain text. ##### Response ``` 04:01:2a:0f:2a:03 ``` * * * ## GET Get Network Interface's Type `/metadata/v1/interfaces/public/0/type` The type of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/type` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/type" ``` #### Responses 200 The network interface type as plain text. ##### Response ``` public ``` * * * ## GET Get Public Interface's IPv4 Attributes `/metadata/v1/interfaces/public/0/ipv4/` An index of the specified network interface's IPv4 attributes. ##### Request: `/metadata/v1/interfaces/public/0/ipv4/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/" ``` #### Responses 200 The index of available IPv4 attributes as a plain-text list. ##### Response ``` address netmask gateway ``` * * * ## GET Get Public Interface IPv4 Address `/metadata/v1/interfaces/public/0/ipv4/address` The IPv4 address of the specified network interface, as plain text. ##### Request: `/metadata/v1/interfaces/public/0/ipv4/address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address" ``` #### Responses 200 Success ##### Response ``` 104.131.20.105 ``` * * * ## GET Get Public Interface IPv4 Netmask `/metadata/v1/interfaces/public/0/ipv4/netmask` The netmask of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/ipv4/netmask` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/netmask" ``` #### Responses 200 Success ##### Response ``` 255.255.192.0 ``` * * * ## GET Get Public Interface Gateway Address `/metadata/v1/interfaces/public/0/ipv4/gateway` The gateway of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/ipv4/gateway` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/gateway" ``` #### Responses 200 Success ##### Response ``` 104.131.0.1 ``` * * * ## GET Get IPv6 Network Interfaces Index `/metadata/v1/interfaces/public/0/ipv6/` An index of the specified network interface's IPv6 attributes. ##### Request: `/metadata/v1/interfaces/public/0/ipv6/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/" ``` #### Responses 200 Success ##### Response ``` address cidr gateway ``` * * * ## GET Get Public Interface IPv6 Address `/metadata/v1/interfaces/public/0/ipv6/address` The IPv6 address of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/ipv6/address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/address" ``` #### Responses 200 Success ##### Response ``` 2604:A880:0800:0010:0000:0000:017D:2001 ``` * * * ## GET Get Public Interface's IPv6 CIDR `/metadata/v1/interfaces/public/0/ipv6/cidr` The IPv6 CIDR of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/ipv6/cidr` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/cidr" ``` #### Responses 200 Success ##### Response ``` 64 ``` * * * ## GET Get Public Interface's IPv6 Gateway Address `/metadata/v1/interfaces/public/0/ipv6/gateway` The IPv6 gateway address of the specified network interface. ##### Request: `/metadata/v1/interfaces/public/0/ipv6/gateway` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/ipv6/gateway" ``` #### Responses 200 Success ##### Response ``` 2604:A880:0800:0010:0000:0000:0000:0001 ``` * * * ## GET Get IPv4 Anchor Attributes Index `/metadata/v1/interfaces/public/0/anchor_ipv4/` An index of the specified "Anchor" network interface's IPv4 attributes. **Note:** An "Anchor" interface is an implementation detail of [DigitalOcean Reserved IPs](https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean). ##### Request: `/metadata/v1/interfaces/public/0/anchor_ipv4/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/" ``` #### Responses 200 Success ##### Response ``` address netmask gateway ``` * * * ## GET Get Anchor IPv4 Address `/metadata/v1/interfaces/public/0/anchor_ipv4/address` The IPv4 address of the specified "Anchor" network interface. **Note:** An "Anchor" interface is an implementation detail of [DigitalOcean Reserved IPs](https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean). ##### Request: `/metadata/v1/interfaces/public/0/anchor_ipv4/address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/address" ``` #### Responses 200 Success ##### Response ``` 10.17.0.160 ``` * * * ## GET Get Anchor IPv4 Netmask `/metadata/v1/interfaces/public/0/anchor_ipv4/netmask` The netmask of the specified "Anchor" network interface. **Note:** An "Anchor" interface is an implementation detail of [DigitalOcean Reserved IPs](https://www.digitalocean.com/community/tutorials/how-to-use-floating-ips-on-digitalocean). ##### Request: `/metadata/v1/interfaces/public/0/anchor_ipv4/netmask` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/interfaces/public/0/anchor_ipv4/netmask" ``` #### Responses 200 Success ##### Response ``` 255.255.0.0 ``` * * * --- Source: https://docs.digitalocean.com/reference/api/metadata/reserved-ips/ --- title: Reserved IPs description: DigitalOcean [Reserved IP addresses](https://www.digitalocean.com/docs/networking/floating-ips/) are publicly-accessible static IP addresses that you … product: Reference url: https://docs.digitalocean.com/reference/api/metadata/reserved-ips/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Reserved IPs Generated on 4 Dec 2026 DigitalOcean [Reserved IP addresses](https://www.digitalocean.com/docs/networking/floating-ips/) are publicly-accessible static IP addresses that you can assign to Droplets and instantly remap between other Droplets in the same datacenter. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Reserved IP Index](#getReservedIp) - **GET** [Get Reserved IPv4 Attributes Index](#getReservedIpIpv4) - **GET** [Get Reserved IPv6 Attributes Index](#getReservedIpIpv6) - **GET** [Get Reserved IPv4 Status](#getReservedIpIpv4Active) - **GET** [Get Reserved IPv6 Status](#getReservedIpIpv6Active) - **GET** [Get Reserved IPv4 Address](#getReservedIpIpv4Address) - **GET** [Get Reserved IPv6 Address](#getReservedIpIpv6Address) ## GET Get Reserved IP Index `/metadata/v1/reserved_ip/` An index of IPv4/IPv6 Reserved IPs. ##### Request: `/metadata/v1/reserved_ip/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/" ``` #### Responses 200 Success ##### Response ``` ipv4/ ipv6/ ``` * * * ## GET Get Reserved IPv4 Attributes Index `/metadata/v1/reserved_ip/ipv4/` An index of IPv4 Reserved IP attributes. ##### Request: `/metadata/v1/reserved_ip/ipv4/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv4/" ``` #### Responses 200 Success ##### Response ``` active ip_address ``` * * * ## GET Get Reserved IPv6 Attributes Index `/metadata/v1/reserved_ip/ipv6/` An index of IPv6 Reserved IP attributes. ##### Request: `/metadata/v1/reserved_ip/ipv6/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv6/" ``` #### Responses 200 Success ##### Response ``` active ip_address ``` * * * ## GET Get Reserved IPv4 Status `/metadata/v1/reserved_ip/ipv4/active` Displays true if a Reserved IP is currently assigned to the Droplet and false if it is not. ##### Request: `/metadata/v1/reserved_ip/ipv4/active` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv4/active" ``` #### Responses 200 Success ##### Response ``` true ``` * * * ## GET Get Reserved IPv6 Status `/metadata/v1/reserved_ip/ipv6/active` Displays true if a Reserved IPv6 is currently assigned to the Droplet and false if it is not. ##### Request: `/metadata/v1/reserved_ip/ipv6/active` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv6/active" ``` #### Responses 200 Success ##### Response ``` true ``` * * * ## GET Get Reserved IPv4 Address `/metadata/v1/reserved_ip/ipv4/ip_address` The IP address of the Reserved IP that is currently assigned to the Droplet. ##### Request: `/metadata/v1/reserved_ip/ipv4/ip_address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv4/ip_address" ``` #### Responses 200 Success ##### Response ``` 45.55.96.17 ``` * * * ## GET Get Reserved IPv6 Address `/metadata/v1/reserved_ip/ipv6/ip_address` The IP address of the Reserved IPv6 that is currently assigned to the Droplet. ##### Request: `/metadata/v1/reserved_ip/ipv6/ip_address` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/reserved_ip/ipv6/ip_address" ``` #### Responses 200 Success ##### Response ``` 2604:A880:0800:0010:0000:0000:017D:2001 ``` * * * Learn more: [Reserved IPs Pricing](https://docs.digitalocean.com/products/networking/reserved-ips/details/pricing/index.html.md), [How to Send Outbound Traffic Over a Reserved IP](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/index.html.md), [How to Reassign or Unassign Reserved IPs](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/modify/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/metadata/tags/ --- title: Tags description: '[Tags are custom labels](https://www.digitalocean.com/docs/droplets/how-to/tag/) you can apply to Droplets and other DigitalOcean resources.' product: Reference url: https://docs.digitalocean.com/reference/api/metadata/tags/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Tags Generated on 4 Dec 2026 [Tags are custom labels](https://www.digitalocean.com/docs/droplets/how-to/tag/) you can apply to Droplets and other DigitalOcean resources. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Associated Tags](#getTags) ## GET Get Associated Tags `/metadata/v1/tags` An index of tags associated with the Droplet. ##### Request: `/metadata/v1/tags` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/tags" ``` #### Responses 200 Success ##### Response ``` production application v1 ``` * * * --- Source: https://docs.digitalocean.com/reference/api/metadata/virtual-ips/ --- title: Virtual IPs description: Virtual IPs are the IP addresses of the [network load balancers](https://www.digitalocean.com/docs/networking/load-balancers/) a Droplet is attached … product: Reference url: https://docs.digitalocean.com/reference/api/metadata/virtual-ips/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Virtual IPs Generated on 4 Dec 2026 Virtual IPs are the IP addresses of the [network load balancers](https://www.digitalocean.com/docs/networking/load-balancers/) a Droplet is attached to. Adding a Droplet to a network load balancer adds that load balancer's IP address to this list. Base URL `http://169.254.169.254` ## Endpoints - **GET** [Get Virtual IP Index](#getVirtualIps) - **GET** [Get Virtual IPv4 Addresses](#getVirtualIpsIpv4) - **GET** [Get Virtual IPv6 Addresses](#getVirtualIpsIpv6) ## GET Get Virtual IP Index `/metadata/v1/virtual_ips/` An index of the available virtual IP address types. ##### Request: `/metadata/v1/virtual_ips/` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/virtual_ips/" ``` #### Responses 200 Success ##### Response ``` ipv4 ipv6 ``` * * * ## GET Get Virtual IPv4 Addresses `/metadata/v1/virtual_ips/ipv4` The IPv4 addresses of the network load balancers that the Droplet is attached to. The response lists one address per load balancer. ##### Request: `/metadata/v1/virtual_ips/ipv4` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/virtual_ips/ipv4" ``` #### Responses 200 Success ##### Response ``` 203.0.113.10 203.0.113.11 ``` * * * ## GET Get Virtual IPv6 Addresses `/metadata/v1/virtual_ips/ipv6` The IPv6 addresses of the network load balancers that the Droplet is attached to. The response lists one address per load balancer. ##### Request: `/metadata/v1/virtual_ips/ipv6` ### cURL ```bash curl -X GET \ "http://169.254.169.254/metadata/v1/virtual_ips/ipv6" ``` #### Responses 200 Success ##### Response ``` 2001:DB8::1 2001:DB8::2 ``` * * * --- Source: https://docs.digitalocean.com/reference/api/oauth/ --- title: DigitalOcean OAuth API description: Complete reference documentation for the OAuth API, including application registration. product: Reference url: https://docs.digitalocean.com/reference/api/oauth/ last_updated: "2026-10-20" --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # DigitalOcean OAuth API Last verified 20 Oct 2026 [OAuth 2.0](https://datatracker.ietf.org/doc/html/rfc6749) is an open standard for authorization that enables third-party applications to obtain limited access to a service. The DigitalOcean OAuth API lets you obtain limited access to DigitalOcean teams by delegating authentication to DigitalOcean. ## About the DigitalOcean OAuth API Our OAuth API supports the [authorization code flow](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1), meant for applications that can perform a server-side token exchange, and the [implicit authorization flow](https://datatracker.ietf.org/doc/html/rfc6749#section-1.3.2), meant for client-side applications such as mobile or desktop clients. The OAuth API supports two types of clients, distinguished by whether they can keep a client secret confidential: - **Confidential clients** can securely store a client secret, such as web applications running on a server. You register them manually in the control panel, which assigns them a client ID and a client secret that they use to request access tokens. - **Public clients** cannot securely store a client secret, such as native, desktop, command-line, or Model Context Protocol (MCP) clients. They have no client secret and instead secure the authorization code exchange using [PKCE](https://datatracker.ietf.org/doc/html/rfc7636). You typically create them using [Dynamic Client Registration](#register). The DigitalOcean authorization server, `https://cloud.digitalocean.com/v1/oauth`, has the following endpoints: | Endpoint | Description | |---|---| | [`/authorize`](#authorize) | Request user authorization | | [`/token`](#token) | Request an authorized access token | | [`/token`](#refresh) (with `grant_type=refresh_token`) | Refresh an access token using a refresh token | | [`/revoke`](#revoke) | Revoke an access token | | [`/register`](#register) | Dynamically register a public OAuth client | | [`/register/{client_id}`](#manage-client) | Read, update, or delete a dynamically registered client | The authorization server also publishes an [authorization server metadata](#metadata) document at `https://cloud.digitalocean.com/.well-known/oauth-authorization-server`. To use the OAuth API, first [register your application](https://cloud.digitalocean.com/account/api/applications/new?utm_source=docs-agent&utm_medium=md) to use OAuth. Registering a confidential application assigns it a client ID and client secret which you then use in API calls to the DigitalOcean authorization server. Public clients can instead be registered programmatically using [Dynamic Client Registration](#register), which assigns a client ID but no client secret. For issues and errors, use [the OAuth API troubleshooting guide](https://docs.digitalocean.com/support/im-getting-an-error-when-using-the-digitalocean-oauth-api./index.html.md). ## `/authorize`: Request User Authorization Use the `https://cloud.digitalocean.com/v1/oauth/authorize` endpoint as an authorization link to send to a user for your registered OAuth application. ### Example You can view an example link for a registered OAuth application in the control panel. On the [**OAuth Applications** page](https://cloud.digitalocean.com/account/api/applications?utm_source=docs-agent&utm_medium=md), click the **…** next to the application’s name, then click **View** to open the **OAuth Application Details** window. In this window, the **Link to authorization code** section has an example link. ### Parameters | Parameter | Type | Necessity | Description | |---|---|---|---| | `client_id` | string | Required | The client ID for your registered OAuth application on DigitalOcean. | | `redirect_uri` | string | Required | The callback URL where users are sent after authorization. Must match a callback URL you provided during application registration. | | `response_type` | string | Required | Set to `code` to request an authorization code. Set to `token` to request an OAuth token for implicit authorization. | | `scope` | string | Optional | See [all token scopes](https://docs.digitalocean.com/reference/api/scopes/index.html.md). | | `state` | string | Optional | An unguessable random string. Used to protect against request forgery attacks. Recommended. | | `prompt` | string | Optional | A space-separated list of strings that defines the behavior of the authorization page as shown to the user when they authorize an OAuth application. See values below. | | `code_challenge` | string | Optional | The [PKCE](https://datatracker.ietf.org/doc/html/rfc7636) code challenge. Required for public clients. Only valid with `response_type=code`. | | `code_challenge_method` | string | Optional | The PKCE code challenge method. Only `S256` is supported. Required when `code_challenge` is provided. | The `response_type` parameter can have the following values: - `code`: Requests an authorization code. Used for the authorization code flow for web applications. When you use this response type, you request the access token grant with the `/token` endpoint. - `token`: Requests an OAuth token. Used for the implicit authorization flow for client-side applications. When you use this response type, you receive the access token grant in a callback. The `prompt` parameter can have the following values: - `select_account` (default): - If a user is not signed in, they are required to sign in. - Signed-in users must authorize the OAuth application before proceeding. - `none`: - Signed-in users who have already authorized the application are redirected back to the valid `redirect_url` with a new token. A hint can be used by specifying an `i` query parameter with the first 6 characters of an expected account UUID. - Signed-in users who haven’t authorized the application are redirected with `error=consent_required`. Signed-out users are redirected with `error=login_required`. Public clients must use `response_type=code` and secure the authorization code exchange with [PKCE](https://datatracker.ietf.org/doc/html/rfc7636). When authorizing a public client, include a `code_challenge` and set `code_challenge_method` to `S256`. Retain the corresponding code verifier. You exchange it for a token by passing it as the `code_verifier` parameter to the [`/token`](#token) endpoint. PKCE is only used with the authorization code flow. Although PKCE is required only for public clients, confidential clients can also use it for additional protection. If you omit the `scope` parameter in the authorization request, the consent screen displays a **Manage permissions** option, allowing the user to select specific granular scopes to grant. Public clients may register more than one redirect URI, and any one of them can be used with `redirect_uri`. Loopback redirect URIs (`127.0.0.1`, `[::1]`, or `localhost`) match on any port, so a native application can use the ephemeral port it binds at runtime. ### Returns If the user authorizes the application, DigitalOcean redirects back to your `redirect_uri` with the following parameters: - One of the following, depending on the specified `response_type`: - The `code` parameter with an authorization code. Use this in access token requests to the [`/token`](#token) endpoint. - The `token` parameter with an OAuth token. Here is an example callback (access token grant) for `token` response types: ``` https://example.com/callback#access_token=doo_v1_EXAMPLE4ea...381 &token_type=bearer &expires_in=2592000 &state=0807edf7d85e5d ``` - The `state` parameter, if you specified one in the authorization request. Verify that the value of `state` in the response matches the one you provided in the request. If not, it indicates that the request may be a forgery attack created by a third party, and you should abort the request. - The `expires_in` parameter, which indicates the time remaining before the token expires in seconds. The token is available to use to make requests via [the DigitalOcean API](https://docs.digitalocean.com/reference/api/index.html.md#digitlaocean) until the token expires (30 days after being issued for confidential clients, or one hour for public clients) or is otherwise invalidated (for example, revoked or refreshed). ## POST `/token`: Request Authorized Access Token If a user authorizes your application with the authorization code flow, make a POST request to the `https://cloud.digitalocean.com/v1/oauth/token` endpoint with the appropriate parameters to request the access token. ### Example Here is an example access token request for a confidential client using `curl`: ```shell curl -X POST "https://cloud.digitalocean.com/v1/oauth/token?grant_type=authorization_code &code=f252c4bd6b1b4d249b7 &client_id=4c413ac36ac22268 &client_secret=b05a2ad77b24f3 &redirect_uri=https://example.com/callback" ``` A public client authenticates with a PKCE `code_verifier` instead of a `client_secret`: ```shell curl -X POST "https://cloud.digitalocean.com/v1/oauth/token?grant_type=authorization_code &code=f252c4bd6b1b4d249b7 &client_id=4c413ac36ac22268 &code_verifier=EXAMPLE_dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk &redirect_uri=https://example.com/callback" ``` ### Parameters | Parameter | Type | Necessity | Description | |---|---|---|---| | `grant_type` | string | Required | Must be set to `authorization_code` for an access token request. | | `code` | string | Required | The code received as a response to authorization with the `/authorize` endpoint. | | `client_id` | string | Required | The client ID for your registered OAuth application on DigitalOcean. | | `client_secret` | string | Conditional | The client secret for your registered OAuth application on DigitalOcean. Required for confidential clients. Public clients omit this and send `code_verifier` instead. | | `code_verifier` | string | Conditional | The [PKCE](https://datatracker.ietf.org/doc/html/rfc7636) code verifier corresponding to the `code_challenge` sent to the `/authorize` endpoint. Required for public clients. | | `redirect_uri` | string | Required | Must match the callback URL that you supplied during application registration. | ### Response If the request was successful, the authorization server returns a JSON access token grant similar to the following: ```json { "access_token": "doo_v1_EXAMPLE4efe8999d0892b6069bc754a78c656f8e843361e1e4d1cd04ac85c381", "token_type": "bearer", "expires_in": 2592000, "refresh_token": "dor_v1_EXAMPLE3104521c47be0b580e9296453ef4y319b02b5513469f0ec72d99af2e2", "scope": "read", "info": { "name": "Sammy the Shark", "email":"sammy@digitalocean.com", "uuid":"EXAMPLE0-a636-11ec-9e9d-3381ceabe039", "team_uuid": "EXAMPLE1-a636-11ec-a6ac-1323bf96ef4d", "team_name": "My Team" } } ``` In addition to other information, the response includes two important items: `access_token` and `refresh_token`. The access token is available to use to make requests via [the DigitalOcean API](https://docs.digitalocean.com/reference/api/index.html.md#digitlaocean) until the token expires or token is otherwise invalidated. For public clients, the access token is short-lived and expires in one hour (`"expires_in": 3600`). Use the `refresh_token` to obtain a new access token when it expires. The following is an example public-client response: ```json { "access_token": "doo_v1_EXAMPLE4efe8999d0892b6069bc754a78c656f8e843361e1e4d1cd04ac85c381", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "dor_v1_EXAMPLE3104521c47be0b580e9296453ef4y319b02b5513469f0ec72d99af2e2", "scope": "read", "info": { "name": "Sammy the Shark", "email":"sammy@digitalocean.com", "uuid":"EXAMPLE0-a636-11ec-9e9d-3381ceabe039", "team_uuid": "EXAMPLE1-a636-11ec-a6ac-1323bf96ef4d", "team_name": "My Team" } } ``` ## POST `/token`: Refresh Token Each access token comes with a refresh token. You can use a refresh token exactly once to create a new access token (and refresh token). Doing so invalidates the access token that the refresh token was issued with. A common use case is refreshing an expired token. To refresh a token, make a POST request to the `https://cloud.digitalocean.com/v1/oauth/token` endpoint with `grant_type=refresh_token`. ### Example ```shell curl -X POST "https://cloud.digitalocean.com/v1/oauth/token" \ -d "grant_type=refresh_token" \ -d "refresh_token=dor_v1_EXAMPLE3104521c47be0b580e9296453ef4y319b02b5513469f0ec72d99af2e2" ``` ### Parameters | Parameter | Type | Necessity | Description | |---|---|---|---| | `grant_type` | string | Required | Must be set to `refresh_token` for a token refresh request. | | `refresh_token` | string | Required | The `refresh_token` that was received with the original access token. | ### Response The refresh token response is in the same format as the original access token grant. See [the response for `/token`](#access-token-grant). For public clients, refreshed access tokens are also short-lived and expire after one hour. ## POST `/revoke`: Revoke Token Flow Revoking an access token invalidates it so that it cannot be used. To revoke an access token, send a POST request to the `https://cloud.digitalocean.com/v1/oauth/revoke` endpoint with an `Authorization: Bearer` header and the appropriate parameters. ### Parameters | Parameter | Type | Necessity | Description | |---|---|---|---| | `token` | string | Required | Must be set to the value of the access token. | ### Response The response to this request is an empty JSON object. ## `/.well-known/oauth-authorization-server`: Authorization Server Metadata The authorization server publishes an [OAuth 2.0 authorization server metadata](https://datatracker.ietf.org/doc/html/rfc8414) document so that clients can automatically discover its endpoints and capabilities. This is useful for public clients, such as MCP clients, that register and authorize programmatically. Send an unauthenticated GET request to the `https://cloud.digitalocean.com/.well-known/oauth-authorization-server` endpoint to retrieve the document. ### Example Retrieve the authorization server metadata document using `curl`: ```shell curl "https://cloud.digitalocean.com/.well-known/oauth-authorization-server" ``` ### Response The authorization server returns a JSON metadata document similar to the following: ```json { "issuer": "https://cloud.digitalocean.com", "authorization_endpoint": "https://cloud.digitalocean.com/v1/oauth/authorize", "token_endpoint": "https://cloud.digitalocean.com/v1/oauth/token", "registration_endpoint": "https://cloud.digitalocean.com/v1/oauth/register", "revocation_endpoint": "https://cloud.digitalocean.com/v1/oauth/revoke", "response_types_supported": ["code"], "response_modes_supported": ["query"], "grant_types_supported": ["authorization_code", "refresh_token"], "token_endpoint_auth_methods_supported": ["none"], "code_challenge_methods_supported": ["S256"], "client_id_metadata_document_supported": false } ``` The `token_endpoint_auth_methods_supported` field lists `none`, the method public clients use to authenticate with [PKCE](https://datatracker.ietf.org/doc/html/rfc7636) instead of a client secret. The `code_challenge_methods_supported` field lists `S256`, the only PKCE code challenge method the authorization server supports. ## POST `/register`: Dynamic Client Registration Public clients are registered programmatically using [OAuth 2.0 Dynamic Client Registration](https://datatracker.ietf.org/doc/html/rfc7591). Send an unauthenticated POST request with a JSON body to the `https://cloud.digitalocean.com/v1/oauth/register` endpoint to create a new client. This endpoint registers public clients only and never returns a client secret. ### Example Register a public client using `curl`: ```shell curl -X POST "https://cloud.digitalocean.com/v1/oauth/register" \ -H "Content-Type: application/json" \ -d '{ "client_name": "My CLI App", "client_uri": "https://example.com", "redirect_uris": ["http://127.0.0.1:33418/callback", "http://localhost:33418/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"] }' ``` ### Parameters Send the following parameters in the JSON request body. | Parameter | Type | Necessity | Description | |---|---|---|---| | `redirect_uris` | array of strings | Required | The callback URLs where users are sent after authorization. Provide at least one and at most five. Any one of them can be used at authorization time. | | `token_endpoint_auth_method` | string | Required | Must be set to `none`. Only public clients can be registered dynamically. | | `grant_types` | array of strings | Required | Must include `authorization_code`. Can also include `refresh_token`. | | `response_types` | array of strings | Optional | Defaults to `["code"]`. Must be `["code"]` if provided. | | `client_name` | string | Optional | A human-readable name for the client. | | `client_uri` | string | Optional | A URL for the client’s homepage. | ### Response If the request is successful, the authorization server returns a `201 Created` response with a JSON body similar to the following: ```json { "client_id": "4c413ac36ac22268", "client_id_issued_at": 1727181600, "redirect_uris": ["http://127.0.0.1:33418/callback", "http://localhost:33418/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"], "client_name": "My CLI App", "client_uri": "https://example.com", "registration_access_token": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210", "registration_client_uri": "https://cloud.digitalocean.com/v1/oauth/register/4c413ac36ac22268" } ``` The response never includes a `client_secret`. Store the `registration_access_token` and `registration_client_uri` values, which you need to [read, update, or delete the client](#manage-client) later. The `registration_access_token` is shown only in this response and cannot be retrieved again. ## `/register/{client_id}`: Manage a Registered Client Use the `https://cloud.digitalocean.com/v1/oauth/register/{client_id}` endpoints to read, update, or delete a dynamically registered public client, as defined by [OAuth 2.0 Dynamic Client Registration Management](https://datatracker.ietf.org/doc/html/rfc7592). Replace `{client_id}` with the `client_id` returned during registration. All three methods require the `registration_access_token` returned during registration, sent as a bearer token in the `Authorization` header. ### Get a Client Send a GET request to retrieve the client’s current registration. The response uses the same format as the registration response but never includes the registration access token. Retrieve a client using `curl`, replacing `` with the token returned during registration: ```shell curl "https://cloud.digitalocean.com/v1/oauth/register/4c413ac36ac22268" \ -H "Authorization: Bearer " ``` ### Update a Client Send a PUT request with a JSON body to replace the client’s metadata. Include the `client_id` in the body, which must match the `client_id` in the URL. The [same validation rules as registration](#register) apply, and the registration access token is not rotated. The response returns the updated registration in the same format as the [registration response](#register-response), without the registration access token. Update a client using `curl`: ```shell curl -X PUT "https://cloud.digitalocean.com/v1/oauth/register/4c413ac36ac22268" \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "client_id": "4c413ac36ac22268", "client_name": "renamed-client", "client_uri": "https://renamed.example.com", "redirect_uris": ["http://127.0.0.1:40000/callback"], "token_endpoint_auth_method": "none", "grant_types": ["authorization_code", "refresh_token"] }' ``` ### Delete a Client Send a DELETE request to remove the client along with its tokens and grants. A successful request returns a `204 No Content` response with an empty body. Delete a client using `curl`: ```shell curl -X DELETE "https://cloud.digitalocean.com/v1/oauth/register/4c413ac36ac22268" \ -H "Authorization: Bearer " ``` --- Source: https://docs.digitalocean.com/reference/api/reference/1-click-applications/ --- title: 1-Click Applications description: 1-Click applications are pre-built Droplet images or Kubernetes apps with software, features, and configuration details already set up for you. They … product: Reference url: https://docs.digitalocean.com/reference/api/reference/1-click-applications/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # 1-Click Applications Generated on 4 Dec 2026 1-Click applications are pre-built Droplet images or Kubernetes apps with software, features, and configuration details already set up for you. They can be found in the [DigitalOcean Marketplace](https://marketplace.digitalocean.com/). Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List 1-Click Applications](#oneClicks_list) - **POST** [Install Kubernetes 1-Click Applications](#oneClicks_install_kubernetes) ## GET List 1-Click Applications `/v2/1-clicks` **Authorizations: bearer_auth** Http: Bearer ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all available 1-Click applications, send a GET request to `/v2/1-clicks`. The `type` may be provided as query paramater in order to restrict results to a certain type of 1-Click, for example: `/v2/1-clicks?type=droplet`. Current supported types are `kubernetes` and `droplet`. The response will be a JSON object with a key called `1_clicks`. This will be set to an array of 1-Click application data, each of which will contain the the slug and type for the 1-Click. #### Query Parameters `type` string, one of: droplet, kubernetes optional Example: `kubernetes` Restrict results to a certain type of 1-Click. ##### Request: `/v2/1-clicks` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/1-clicks" ``` ### Python ```python import os from pydo import Client client = Client(token="") one_click_apps = client.one_clicks.list() ``` #### Responses **200** A JSON object with a key of 1_clicks. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `1_clicks` array of object optional **Show child properties** `slug` string required Example: `monitoring` The slug identifier for the 1-Click application. `type` string required Example: `kubernetes` The type of the 1-Click application. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "1_clicks": [ { "slug": "monitoring", "type": "kubernetes" }, { "slug": "wordpress-18-04", "type": "droplet" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Install Kubernetes 1-Click Applications `/v2/1-clicks/kubernetes` To install a Kubernetes 1-Click application on a cluster, send a POST request to `/v2/1-clicks/kubernetes`. The `addon_slugs` and `cluster_uuid` must be provided as body parameter in order to specify which 1-Click application(s) to install. To list all available 1-Click Kubernetes applications, send a request to `/v2/1-clicks?type=kubernetes`. #### Request Body: `application/json` `addon_slugs` array of string required Example: `["kube-state-metrics","loki"]` An array of 1-Click Application slugs to be installed to the Kubernetes cluster. `cluster_uuid` string required Example: `50a994b6-c303-438f-9495-7e896cfe6b08` A unique ID for the Kubernetes cluster to which the 1-Click Applications will be installed. ##### Request: `/v2/1-clicks/kubernetes` ### Payload Content type `application/json` ```json { "addon_slugs": [ "kube-state-metrics", "loki" ], "cluster_uuid": "50a994b6-c303-438f-9495-7e896cfe6b08" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"addon_slugs": ["kube-state-metrics", "loki"], "cluster_uuid": "50a994b6-c303-438f-9495-7e896cfe6b08"}'' \ "https://api.digitalocean.com/v2/1-clicks/kubernetes" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) install_req = { "addon_slugs": ["kube-state-metrics", "loki"], "cluster_uuid": "50a994b6-c303-438f-9495-7e896cfe6b08", } install_resp = client.one_clicks.install_kubernetes(install_req) ``` #### Responses **200** The response will verify that a job has been successfully created to install a 1-Click. The post-installation lifecycle of a 1-Click application can not be managed via the DigitalOcean API. For additional details specific to the 1-Click, find and view its DigitalOcean Marketplace page. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `message` string optional Example: `Successfully kicked off addon job.` A message about the result of the request. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "message": "Successfully kicked off addon job." } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/account/ --- title: Account description: Provides information about your current account. product: Reference url: https://docs.digitalocean.com/reference/api/reference/account/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Account Generated on 4 Dec 2026 Provides information about your current account. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [Get User Information](#account_get) ## GET Get User Information `/v2/account` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: account:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To show information about the current user account, send a GET request to `/v2/account`. ##### Request: `/v2/account` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/account" ``` ### Python ```python import os from pydo import Client client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN")) account_info = client.account.get() ``` #### Responses **200** A JSON object keyed on account with an excerpt of the current user account data. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `account` object optional **Show child properties** `droplet_limit` integer required Example: `25` The total number of Droplets current user or team may have active at one time. Requires `droplet:read` scope. `email` string required Example: `sammy@digitalocean.com` The email address used by the current user to register for DigitalOcean. `email_verified` boolean required Example: `true` If true, the user has verified their account via email. False otherwise. `floating_ip_limit` integer required Example: `5` The total number of Floating IPs the current user or team may have. Requires `reserved_ip:read` scope. `name` string optional Example: `Sammy the Shark` The display name for the current user. `status` string, one of: active, warning, locked required Example: `active` This value is one of "active", "warning" or "locked". `status_message` string required Example: ` ` A human-readable message giving more details about the status of the account. `team` object optional When authorized in a team context, includes information about the current team. **Show child properties** `name` string optional Example: `My Team` The name for the current team. `uuid` string optional Example: `5df3e3004a17e242b7c20ca6c9fc25b701a47ece` The unique universal identifier for the current team. `uuid` string required Example: `b6fr89dbf6d9156cace5f3c78dc9851d957381ef` The unique universal identifier for the current user. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "account": { "droplet_limit": 25, "email": "sammy@digitalocean.com", "email_verified": true, "floating_ip_limit": 5, "name": "Sammy the Shark", "status": "active", "status_message": " ", "team": { "name": "My Team", "uuid": "5df3e3004a17e242b7c20ca6c9fc25b701a47ece" }, "uuid": "b6fr89dbf6d9156cace5f3c78dc9851d957381ef" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/action-gateway-data-plane/ --- title: Action Gateway Data Plane description: 'The Action Gateway data plane finds and runs tools in a session. These endpoints are the REST forms of the session's MCP meta tools: - `POST …' product: Reference url: https://docs.digitalocean.com/reference/api/reference/action-gateway-data-plane/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Action Gateway Data Plane Generated on 4 Dec 2026 The Action Gateway data plane finds and runs tools in a session. These endpoints are the REST forms of the session's MCP meta tools: - `POST /tools/search` is `action_search`. - `POST /tools/invoke` is `action_invoke`. - `POST /code/execute` is `action_code`. `GET /tools` lists the tools that a session can call, and the `/approvals` endpoints approve or deny calls waiting for approval. **Note:** The data plane uses a separate base URL, `https://actions.do-ai.run`, the same host as a session's `mcpUrl`. It is independent of the control-plane API at `https://api.digitalocean.com`. ### Authentication and Sessions Authenticate with a DigitalOcean personal access token in the `Authorization: Bearer` header. Custom-scoped tokens need the `action_gateway:execute` scope. Every request also acts in one session. Create the session with the [Create a Session](https://docs.digitalocean.com/reference/api/reference/action-gateway/index.html.md#sessions_create) endpoint, then send its UUID in the `X-Session-Id` header or in the request path. The UUID is the value at the end of the session's `sessionUrn` and `mcpUrl`. The token must belong to the user who created the session, in the session's team. The session's `tools` selection limits which tools are available, and its `policy` decides whether each call is allowed, needs approval, or is denied. Policy is enforced the same way on these endpoints and on the session's MCP URL. Tools that use connections run with the connections of the session's `actorId`. ### Results and Errors Successful requests to `/tools/search` and `/code/execute` return a tool result. Check `status` before reading `output`. `/tools/invoke` returns one tool result per call, and a well-formed request returns `200` even when some calls fail. Failed requests return the same shape with `status` set to `failed` and an `error` object. Branch on `error.class`, `error.retriable`, and `error.recovery_hint` rather than on `error.message`. Request bodies are limited to 1 MiB. ### Approvals When a session policy sets `ask` for a call, the call does not run. Instead, its result fails with `_meta.status` set to `requires_approval`, an `approval_id`, an `expires_at` time, and a `decide` object describing the approval request. The session owner sends that request with their own token. The caller then repeats the call with the same arguments. Over MCP, clients that support elicitation can approve the call while it waits. Base URL `https://actions.do-ai.run` ## Endpoints - **GET** [List Session Tools](#gatewayTools_list) - **POST** [Search Session Tools](#gatewayTools_list_search) - **POST** [Invoke Session Tools](#gatewayTools_run) - **POST** [Execute Code](#gatewayCode_run) - **POST** [Decide a Pending Approval](#gatewaySessionApprovals_update) - **POST** [Decide a Pending Approval by Session Header](#gatewayApprovals_update) ## GET List Session Tools `/tools` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: action_gateway:execute ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Lists the catalog tools that a session can call, ordered by name. The list applies the session's `tools` selection and omits tools that its policy always denies. Each page includes an `ETag` header. Send it in `If-None-Match` to receive `304 Not Modified` while the page is unchanged. #### Query Parameters `page_size` integer 1 – 100 optional Example: `20` The number of tools returned per page, from 1 to 100. Defaults to 20 when omitted. Other values are rejected with 400. Default: `20` `page_token` string optional Example: `eyJ2IjoxLCJhZnRlciI6ImV4YV93ZWJfc2VhcmNoIiwiZnAiOiI5YzFlNWI3YTNkMmY0ZTYwIn0` The `next_page_token` from the previous response. A token is only valid for the session that received it. #### Header Parameters `X-Session-Id` string (uuid) optional Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session to act in: the UUID at the end of the session's `sessionUrn` and `mcpUrl`. For a pinned endpoint version, use the session UUID at the end of its `mcp_url`, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or `X-Endpoint-Id`, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403. `X-Endpoint-Id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in `X-Action-Gateway-Endpoint-Version`. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or `X-Session-Id`, not both. A malformed value or more than one value returns 400. `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." `If-None-Match` string optional Example: `"3f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8c"` The `ETag` from a previous response for the same page. If the page is unchanged, the response is `304 Not Modified` with no body. ##### Request: `/tools` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Session-Id: $SESSION_ID" \ "https://actions.do-ai.run/tools?page_size=20" ``` #### Responses **200** A page of tools. Response Headers `ETag` string An identifier for this page's contents. `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. Response Schema: `application/json` `next_page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` An opaque cursor for the next page of results. Pass it back verbatim as `page_token`. It is empty on the last page. `tools` array of object optional Tools ordered by name. **Show child properties** `_meta` object optional Example: `{"parallelizable":true,"streaming_safe":false,"version":"1"}` Additional tool metadata. `annotations` object optional Nullable Advisory hints about a tool's behavior, with the meaning of MCP tool annotations. Do not rely on them for security decisions. **Show child properties** `destructiveHint` boolean optional Nullable Example: `false` The tool may perform destructive updates. `idempotentHint` boolean optional Example: `true` Repeating a call with the same arguments has no additional effect. `openWorldHint` boolean optional Nullable Example: `true` The tool interacts with external systems beyond the provider's own data. `readOnlyHint` boolean optional Example: `true` The tool does not modify anything. `title` string optional Example: `Web Search` Human-readable tool title. `description` string optional Example: `Search the public web and return ranked results with titles and URLs.` `inputSchema` object optional The JSON Schema for the tool's `arguments`. `name` string optional Example: `exa_web_search` The provider-qualified tool name. Pass it as `tool` to invoke the tool. `outputSchema` object optional Example: `{"type":"object"}` The JSON Schema for the tool's output, or for the output view bound to the tool in the session. `parallelizable` boolean optional Example: `true` Whether the tool can run alongside other calls in one invoke request. `streamingSafe` boolean optional Example: `false` `title` string optional Example: `Web Search` `version` string optional Example: `1` The immutable tool version. `version` string optional Example: `v1` The catalog version. **304** The page is unchanged since the ETag in If-None-Match. Response Headers `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The endpoint in X-Endpoint-Id does not exist, has no live version, or belongs to another user or team. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** ```json { "next_page_token": "eyJ2IjoxLCJhZnRlciI6ImV4YV93ZWJfc2VhcmNoIiwiZnAiOiI5YzFlNWI3YTNkMmY0ZTYwIn0", "tools": [ { "_meta": { "parallelizable": true, "streaming_safe": false, "version": "1" }, "annotations": { "openWorldHint": true, "readOnlyHint": true, "title": "Web Search" }, "description": "Search the public web and return ranked results with titles and URLs.", "inputSchema": { "properties": { "max_results": { "type": "integer" }, "query": { "type": "string" } }, "required": [ "query" ], "type": "object" }, "name": "exa_web_search", "parallelizable": true, "streamingSafe": false, "title": "Web Search", "version": "1" } ], "version": "v1" } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * ## POST Search Session Tools `/tools/search` Finds the catalog tools that fit one or more use cases. This is the REST form of the `action_search` MCP tool. Each query is searched independently and returns its own result group, so you can see which tools serve which goal. Results include each tool's `inputSchema`, so you can call a tool with `POST /tools/invoke` without another lookup. Results include only tools that the session can call. If the session policy requires approval for `action_search`, the response is a failed result with `_meta.status` set to `requires_approval`. #### Header Parameters `X-Session-Id` string (uuid) optional Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session to act in: the UUID at the end of the session's `sessionUrn` and `mcpUrl`. For a pinned endpoint version, use the session UUID at the end of its `mcp_url`, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or `X-Endpoint-Id`, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403. `X-Endpoint-Id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in `X-Action-Gateway-Endpoint-Version`. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or `X-Session-Id`, not both. A malformed value or more than one value returns 400. `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." #### Request Body: `application/json` `limit` integer optional Example: `3` The maximum number of tools returned per query. Values above 50 are capped at 50. `providers` array of string optional Example: `["exa"]` Restricts every query to these providers. `queries` array of object required Independent search queries. Split separate actions into separate queries. Each query is searched on its own and gets its own result group. **Show child properties** `known_fields` string optional Example: `project:checkout` Known workflow inputs as one string of comma-separated `key:value` pairs, such as identifiers or settings. Used as context, not for keyword matching. `use_case` string required Example: `search the public web for current information` A normalized English description of one complete use case: the action and the intended outcome, including any app the user named. Put personal identifiers in `known_fields` instead. Up to 512 bytes and 32 search terms, with at least one letter or digit. `tags` array of string optional Example: `["web-search"]` Restricts every query to tools with these tags. ##### Request: `/tools/search` ### Payload Content type `application/json` ```json { "limit": 3, "queries": [ { "use_case": "search the public web for current information" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Session-Id: $SESSION_ID" \ -d '{"queries":[{"use_case":"search the public web for current information"}],"limit":3}' \ "https://actions.do-ai.run/tools/search" ``` #### Responses **200** The search ran, or it is waiting for approval. Check status before reading output. Response Headers `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. Response Schema: `application/json` `_meta` object optional Additional result metadata. Keys include: - `status`: `requires_approval`, `requires_authorization`, or `requires_connection_configuration` when the call stopped before running. - `approval_id`, `tool_name`, `expires_at`, and `decide`: present with `requires_approval`. `decide` gives the `method`, `path`, and `body` of the approval request to send. Approve the call, then repeat it with the same arguments before `expires_at`. - `retry`: `{"attempt_count": N, "exhausted": bool}` when the gateway retried the call. - `output_view`: the output view applied to the result. - `cache`: whether the result came from cache, with its age on a hit. **Show child properties** `cache` object optional Cache outcome. Hits always include this metadata. MISS and BYPASS appear only when the call includes cache controls. Cache hits still incur the gateway invocation charge but not an additional provider charge. **Show child properties** `age_seconds` integer optional Example: `12` Age of the cached result in seconds. Present only on a hit. `status` string, one of: HIT, MISS, BYPASS required Example: `HIT` HIT returned a cached result without calling the provider. MISS found no usable result and called the provider. BYPASS skipped caching. `(additional properties)` object optional Additional properties are allowed. `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this call. Include it when contacting support. `error` object optional Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `output` object optional **Show child properties** `results` array of object optional One result group per query, in request order. **Show child properties** `guidance` string optional Example: `No catalog tools matched this query. Retry with different terms.` A suggested next step. Present only when no tools matched. `index` integer optional Example: `1` The 1-based position of the query in the request. `results` array of object optional **Show child properties** `cache` object optional Present when this tool accepts cache controls in the session. Unlike the catalog's cache.ttlSeconds, this describes the session's caching opt-in. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `Search the public web and return ranked results with titles and URLs.` `inputSchema` object optional Example: `{"properties":{"query":{"type":"string"}},"required":["query"],"type":"object"}` The JSON Schema for the tool's `arguments`. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `exa_web_search` The provider-qualified tool name. Pass it as `tool` to invoke the tool. `score` number optional Example: `0.92` The relevance score. Higher is more relevant. `title` string optional Example: `Web Search` `version` string optional Example: `1` `use_case` string optional Example: `search the public web for current information` The query's `use_case`. `status` string, one of: succeeded, failed required Example: `succeeded` **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The endpoint in X-Endpoint-Id does not exist, has no live version, or belongs to another user or team. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **413** The request body is larger than 1 MiB. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "output": { "results": [ { "index": 1, "results": [ { "description": "Search the public web and return ranked results with titles and URLs.", "inputSchema": { "properties": { "max_results": { "type": "integer" }, "query": { "type": "string" } }, "required": [ "query" ], "type": "object" }, "name": "exa_web_search", "score": 0.92, "title": "Web Search", "version": "1" } ], "use_case": "search the public web for current information" } ] }, "status": "succeeded" } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **413** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "Request body is too large.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * ## POST Invoke Session Tools `/tools/invoke` Runs 1 to 10 tool calls in parallel and returns one result per call, in request order. This is the REST form of the `action_invoke` MCP tool. Each call is checked against the session's tool selection and policy, uses the session actor's connections, and applies any output view bound to the tool in the session. A well-formed request returns `200` even when some calls fail. Check each item's `result.status`, and use `success_count` and `error_count` to branch without scanning every item. A call whose policy requires approval fails with `_meta.status` set to `requires_approval`. Have the session's owner approve it, then repeat the call with the same arguments. A call that needs the end user to connect a provider fails with `_meta.status` set to `requires_authorization` or `requires_connection_configuration`. A call that pins an older released version, such as `version: v16` while `v17` is current, returns `_meta.latest_version` with the current release's version. Calls without a version, and calls pinned to the current release, omit it. List a tool's versions and their changes with `GET /v2/action-gateway/tools/{tool_slug}/versions`. Tools opted into result caching use the session's settings automatically. Set cache on an individual tools entry to bypass caching or require a fresher result. The result's _meta.cache reports cache hits. Hits still incur the standard gateway invocation charge but no additional provider charge, because the provider is not called. #### Header Parameters `X-Session-Id` string (uuid) optional Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session to act in: the UUID at the end of the session's `sessionUrn` and `mcpUrl`. For a pinned endpoint version, use the session UUID at the end of its `mcp_url`, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or `X-Endpoint-Id`, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403. `X-Endpoint-Id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in `X-Action-Gateway-Endpoint-Version`. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or `X-Session-Id`, not both. A malformed value or more than one value returns 400. `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." #### Request Body: `application/json` `rationale` string optional Example: `Find current information about DigitalOcean.` One sentence explaining why the tools are being called. Values longer than 512 characters are truncated. `tools` array of object required The tool calls to run in parallel. **Show child properties** `arguments` object optional Example: `{"max_results":1,"query":"DigitalOcean cloud computing"}` The tool's arguments, matching its `inputSchema`. `cache` object optional Optional per-call caching controls. Send beside arguments, not inside them. Accepted only for tools opted into caching in this session; tool search advertises these tools with a cache field. Omitting controls uses the session's settings. Direct MCP tools/call requests use session settings without overrides; use action_invoke for per-call controls. **Show child properties** `max_age_seconds` integer optional Example: `30` Oldest cached result this call accepts, in seconds. Zero bypasses caching. Values above 300 are clamped to 300; larger values cannot increase the session or tool lifetime. This controls accepted result age, not the lifetime of a newly stored entry. `mode` string, one of: auto, bypass optional Example: `auto` auto uses a sufficiently recent cached result or calls the provider and can store a successful result. bypass skips lookup and storage without clearing or refreshing existing entries. `tool` string required Example: `exa_web_search` The tool name, as returned by `GET /tools` or `POST /tools/search`. Names are case-insensitive. `version` string optional Example: `1` An immutable tool version. Omit to use the released version. ##### Request: `/tools/invoke` ### Payload Content type `application/json` ```json { "rationale": "Find current information about DigitalOcean.", "tools": [ { "arguments": { "max_results": 1, "query": "DigitalOcean cloud computing" }, "tool": "exa_web_search" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Session-Id: $SESSION_ID" \ -d '{"rationale":"Find current information about DigitalOcean.","tools":[{"tool":"exa_web_search","arguments":{"query":"DigitalOcean cloud computing","max_results":1}}]}' \ "https://actions.do-ai.run/tools/invoke" ``` #### Responses **200** The calls ran. Each item reports its own success or failure. Response Headers `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. Response Schema: `application/json` `error_count` integer optional Example: `0` `results` array of object optional One result per call, in request order. **Show child properties** `index` integer optional Example: `0` The 0-based position of the call in the request. `result` object optional The result of one tool call. Check `status` before reading `output`. A call that needs approval, authorization, or connection setup fails with a `_meta.status` that names the step to complete. **Show child properties** `_meta` object optional Additional result metadata. Keys include: - `status`: `requires_approval`, `requires_authorization`, or `requires_connection_configuration` when the call stopped before running. - `approval_id`, `tool_name`, `expires_at`, and `decide`: present with `requires_approval`. `decide` gives the `method`, `path`, and `body` of the approval request to send. Approve the call, then repeat it with the same arguments before `expires_at`. - `retry`: `{"attempt_count": N, "exhausted": bool}` when the gateway retried the call. - `output_view`: the output view applied to the result. - `cache`: whether the result came from cache, with its age on a hit. **Show child properties** `cache` object optional Cache outcome. Hits always include this metadata. MISS and BYPASS appear only when the call includes cache controls. Cache hits still incur the gateway invocation charge but not an additional provider charge. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `(additional properties)` object optional Additional properties are allowed. `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this call. Include it when contacting support. `error` object optional Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `output` object optional Example: `{"provider":"exa","results":[{"title":"DigitalOcean","url":"https://www.digitalocean.com/"}]}` The tool's JSON output. Present when `status` is `succeeded`. Its shape is the tool's output schema, or the output view bound to the tool in the session. `status` string, one of: succeeded, failed required Example: `succeeded` `tool` string optional Example: `exa_web_search` The canonical tool name. `version` string optional Example: `1` The tool version that ran. `success_count` integer optional Example: `1` `total_count` integer optional Example: `1` **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** Your team must add prepayment before it can make more tool calls. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The endpoint in X-Endpoint-Id does not exist, has no live version, or belongs to another user or team. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **413** The request body is larger than 1 MiB. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** Example ```json { "error_count": 0, "results": [ { "index": 0, "result": { "_meta": { "cache": { "age_seconds": 12, "status": "HIT" } }, "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "output": { "provider": "exa", "results": [ { "title": "DigitalOcean", "url": "https://www.digitalocean.com/" } ] }, "status": "succeeded" }, "tool": "exa_web_search", "version": "1" } ], "success_count": 1, "total_count": 1 } ``` ```json { "error_count": 1, "results": [ { "index": 0, "result": { "_meta": { "approval_id": "7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d", "decide": { "body": "{\"decision\": \"approve\"}", "method": "POST", "path": "/approvals/session/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b/7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d" }, "expires_at": "2026-10-09T18:30:00Z", "status": "requires_approval", "tool_name": "exa_web_search" }, "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "execution_failed", "message": "Tool \"exa_web_search\" requires user approval before it can run. Ask the user to approve approval_id 7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d (expires 2026-10-09T18:30:00Z) using their own credentials, then call the tool again with the same arguments.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" }, "tool": "exa_web_search", "version": "1" } ], "success_count": 0, "total_count": 1 } ``` ```json { "error_count": 0, "results": [ { "index": 0, "result": { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "output": { "provider": "exa", "results": [ { "title": "DigitalOcean | Cloud Infrastructure for Developers", "url": "https://www.digitalocean.com/" } ] }, "status": "succeeded" }, "tool": "exa_web_search", "version": "1" } ], "success_count": 1, "total_count": 1 } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "forbidden", "message": "Prepayment is required before additional tool calls can be made.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **413** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "Request body is too large.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * ## POST Execute Code `/code/execute` Runs Python code in an ephemeral sandbox and returns its `stdout`, `stderr`, and `exit_code`. This is the REST form of the `action_code` MCP tool. Use it for computation, parsing, and data processing, or to chain several catalog tools in one request. The sandbox provides `invoke_digitalocean_tool(name, arguments)`, which calls a catalog tool and returns a tool result. Those calls follow the session's tool selection and policy. Each request runs in a fresh sandbox, so state is not kept between requests. Execution, including tool calls, is time limited. Code that runs too long fails with a `timeout` error. A nonzero exit code is still a `succeeded` result; check `output.exit_code`. If the session policy requires approval for `action_code`, the response is a failed result with `_meta.status` set to `requires_approval`. #### Header Parameters `X-Session-Id` string (uuid) optional Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session to act in: the UUID at the end of the session's `sessionUrn` and `mcpUrl`. For a pinned endpoint version, use the session UUID at the end of its `mcp_url`, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or `X-Endpoint-Id`, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403. `X-Endpoint-Id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in `X-Action-Gateway-Endpoint-Version`. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or `X-Session-Id`, not both. A malformed value or more than one value returns 400. `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." #### Request Body: `application/json` `code` string required Example: `print("hello from Action Gateway")` Python source to run. The sandbox provides `invoke_digitalocean_tool(name: str, arguments: dict) -> dict`, which calls a catalog tool under the session's policy and returns a tool result. ##### Request: `/code/execute` ### Payload Content type `application/json` ```json { "code": "print(\"hello from Action Gateway\")" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Session-Id: $SESSION_ID" \ -d '{"code":"print(\"hello from Action Gateway\")"}' \ "https://actions.do-ai.run/code/execute" ``` #### Responses **200** The code ran, or it is waiting for approval. Check status before reading output. Response Headers `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. Response Schema: `application/json` `_meta` object optional Additional result metadata. Keys include: - `status`: `requires_approval`, `requires_authorization`, or `requires_connection_configuration` when the call stopped before running. - `approval_id`, `tool_name`, `expires_at`, and `decide`: present with `requires_approval`. `decide` gives the `method`, `path`, and `body` of the approval request to send. Approve the call, then repeat it with the same arguments before `expires_at`. - `retry`: `{"attempt_count": N, "exhausted": bool}` when the gateway retried the call. - `output_view`: the output view applied to the result. - `cache`: whether the result came from cache, with its age on a hit. **Show child properties** `cache` object optional Cache outcome. Hits always include this metadata. MISS and BYPASS appear only when the call includes cache controls. Cache hits still incur the gateway invocation charge but not an additional provider charge. **Show child properties** `age_seconds` integer optional Example: `12` Age of the cached result in seconds. Present only on a hit. `status` string, one of: HIT, MISS, BYPASS required Example: `HIT` HIT returned a cached result without calling the provider. MISS found no usable result and called the provider. BYPASS skipped caching. `(additional properties)` object optional Additional properties are allowed. `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this call. Include it when contacting support. `error` object optional Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `output` object optional **Show child properties** `exit_code` integer (int32) optional Example: `0` The process exit code. A nonzero exit code is still a succeeded result. `stderr` string optional Omitted when empty. `stdout` string optional `status` string, one of: succeeded, failed required Example: `succeeded` **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The endpoint in X-Endpoint-Id does not exist, has no live version, or belongs to another user or team. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **413** The request body is larger than 1 MiB. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **504** The code did not finish within the execution time limit. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "output": { "exit_code": 0, "stdout": "hello from Action Gateway\n" }, "status": "succeeded" } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **413** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "Request body is too large.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **504** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "timeout", "message": "Tool execution timed out.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * ## POST Decide a Pending Approval `/approvals/session/{session_id}/{approval_id}` Approves or denies a tool call that is waiting for approval. A tool result returns `_meta.status` set to `requires_approval` when the session policy sets `ask` for the call, and its `_meta.decide` gives this request's path. Send the decision with the session owner's token. Approval is a separate control request, not a tool, so an agent cannot approve its own calls. After approving, repeat the original call with the same arguments before `expires_at`. An approval applies only to that session, tool version, and set of arguments, and is used once. To ask again after a denial or expiry, repeat the tool call. #### Path Parameters `session_id` string (uuid) required Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session UUID: the value at the end of the session's `sessionUrn` and `mcpUrl`. The session must belong to the authenticated user and team. `approval_id` string (uuid) required Example: `7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d` The `approval_id` from a tool result whose `_meta.status` is `requires_approval`. #### Header Parameters `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." #### Request Body: `application/json` `decision` string, one of: approve, deny required Example: `approve` Whether to let the pending call run. ##### Request: `/approvals/session/{session_id}/{approval_id}` ### Payload Content type `application/json` ```json { "decision": "approve" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"decision":"approve"}' \ "https://actions.do-ai.run/approvals/session/$SESSION_ID/$APPROVAL_ID" ``` #### Responses **200** The decision was recorded. Response Schema: `application/json` `expires_at` string (date-time) optional Example: `2026-10-09T18:30:00Z` Repeat an approved call with the same arguments before this time. `id` string optional Example: `7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d` The approval ID. `status` string, one of: approved, denied optional Example: `approved` **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The approval does not exist or belongs to another session. Approvals for other callers are reported as not found. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **409** The approval was already decided or has expired. Repeat the tool call to request a new approval. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** ```json { "expires_at": "2026-10-09T18:30:00Z", "id": "7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d", "status": "approved" } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **409** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The approval is no longer pending. Re-invoke the tool to request a new approval.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * ## POST Decide a Pending Approval by Session Header `/approvals/{approval_id}` Approves or denies a tool call that is waiting for approval, identifying the session with the `X-Session-Id` header or the endpoint with the `X-Endpoint-Id` header. With `X-Session-Id`, it behaves the same as `POST /approvals/session/{session_id}/{approval_id}`, which is the path returned in a result's `_meta.decide`. An unknown `X-Endpoint-Id` returns 404. #### Path Parameters `approval_id` string (uuid) required Example: `7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d` The `approval_id` from a tool result whose `_meta.status` is `requires_approval`. #### Header Parameters `X-Session-Id` string (uuid) optional Example: `2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` The session to act in: the UUID at the end of the session's `sessionUrn` and `mcpUrl`. For a pinned endpoint version, use the session UUID at the end of its `mcp_url`, not the composite version ID. The session must belong to the authenticated user and team. Send either this header or `X-Endpoint-Id`, not both; both returns 400. With neither, the request uses your default endpoint when default endpoints are enabled for your team, and otherwise returns 403. `X-Endpoint-Id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` The endpoint to act in, as a lowercase endpoint UUID. The request uses the endpoint's current head version, which the response reports in `X-Action-Gateway-Endpoint-Version`. The endpoint must belong to the authenticated user and team; an unknown or inaccessible endpoint returns 404. Send either this header or `X-Session-Id`, not both. A malformed value or more than one value returns 400. `X-Actor-Id` string optional Example: `alice` The actor you expect the session or endpoint to be bound to. It does not select an actor or connections; those come from the session's or endpoint's `actor_id`. When sent, it must equal that binding. A different value, including any value for a target with no actor, returns 403 with the message "The session is not bound to the request's actor." #### Request Body: `application/json` `decision` string, one of: approve, deny required Example: `approve` Whether to let the pending call run. ##### Request: `/approvals/{approval_id}` ### Payload Content type `application/json` ```json { "decision": "deny" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Session-Id: $SESSION_ID" \ -d '{"decision":"deny"}' \ "https://actions.do-ai.run/approvals/$APPROVAL_ID" ``` #### Responses **200** The decision was recorded. Response Headers `X-Action-Gateway-Endpoint-Version` string The composite ID of the endpoint version that served the request, such as `.v3`. Returned when the request targeted an endpoint with `X-Endpoint-Id` or used your default endpoint, so the version is the head at request time. `X-Endpoint-Id` string (uuid) The UUID of your default endpoint. Returned when the request sent neither `X-Session-Id` nor `X-Endpoint-Id` and used your default endpoint. Response Schema: `application/json` `expires_at` string (date-time) optional Example: `2026-10-09T18:30:00Z` Repeat an approved call with the same arguments before this time. `id` string optional Example: `7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d` The approval ID. `status` string, one of: approved, denied optional Example: `approved` **400** The request is invalid: the body is not valid JSON, a required field is missing, a value is out of range, X-Endpoint-Id is malformed or repeated, or both X-Session-Id and X-Endpoint-Id were sent. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **401** The token is missing, invalid, or expired. This response uses the standard DigitalOcean API error format. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The token or session cannot be used for this request. Tokens without the action_gateway:execute scope, and accounts that are not in good standing, are rejected with the standard DigitalOcean API error format. Session failures return a tool result: the session ID is missing or invalid, the session or endpoint belongs to another user or team, X-Actor-Id does not match its actor binding, the session has no policy, or the session policy denies the operation. Response Schema: `application/json` ### Tool Result Error `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ### Error `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The approval does not exist or belongs to another session. Approvals for other callers are reported as not found. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **409** The approval was already decided or has expired. Repeat the tool call to request a new approval. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **412** Your team is not enabled for Action Gateway, or the session or its connection is not set up for this call. For example, the session needs an actorId for OAuth tools, an OAuth connection must be reconnected, or the connection's private network does not match what the MCP server requires. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **429** A rate limit was exceeded. Wait for the number of seconds in Retry-After, when present, before retrying. Response Headers `Retry-After` integer The number of seconds to wait before retrying. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **500** The gateway failed to process the request. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` **503** The gateway or a service it depends on is temporarily unavailable. Retry later. Response Schema: `application/json` `call_id` string required Example: `call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e` A unique identifier for this request, when one was assigned. `error` object required Describes why a request or tool call failed and whether retrying can help. **Show child properties** `class` string (enum) optional Example: `invalid_argument` The failure class. Branch on this value rather than on `message`, which may change. `message` string optional Example: `Request is invalid. Fix request arguments and retry.` A human-readable explanation that is safe to show to an agent or end user. `recovery_hint` string (enum) optional Example: `fix_args` The suggested next step. `retriable` boolean optional Example: `false` Whether retrying the same request later can succeed. `status` string, one of: failed required Example: `failed` ##### Response **200** ```json { "expires_at": "2026-10-09T18:30:00Z", "id": "7d3c2b1a-9e8f-4a6b-8c5d-4e3f2a1b0c9d", "status": "denied" } ``` **400** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "invalid_argument", "message": "Request is invalid. Fix request arguments and retry.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "call_id": "", "error": { "class": "forbidden", "message": "A valid session ID is required to invoke tools.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **404** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The requested route is not supported.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **409** ```json { "call_id": "", "error": { "class": "invalid_argument", "message": "The approval is no longer pending. Re-invoke the tool to request a new approval.", "recovery_hint": "fix_args", "retriable": false }, "status": "failed" } ``` **412** ```json { "call_id": "", "error": { "class": "forbidden", "message": "Your team is not enabled for Action Gateway. Contact support to request access.", "recovery_hint": "contact_support", "retriable": false }, "status": "failed" } ``` **429** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "rate_limited", "message": "Rate limit exceeded. Retry after the indicated delay.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **500** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "The server failed to process the request.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` **503** ```json { "call_id": "call_8b7c6d5e-4f3a-4b2c-9d1e-0f9a8b7c6d5e", "error": { "class": "unavailable", "message": "Gateway is temporarily unavailable. Retry later.", "recovery_hint": "retry_later", "retriable": true }, "status": "failed" } ``` * * * Learn more: [Action Gateway Tool Providers](https://docs.digitalocean.com/products/managed-agents/action-gateway/reference/providers/index.html.md), [How to Configure Server-Side Approval](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/configure-server-side-approval/index.html.md), [Action Gateway Quickstart](https://docs.digitalocean.com/products/managed-agents/action-gateway/quickstart/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/action-gateway/ --- title: Action Gateway description: Action Gateway gives AI agents governed access to tools over the Model Context Protocol (MCP). The `/v2/action-gateway` endpoints manage the tool … product: Reference url: https://docs.digitalocean.com/reference/api/reference/action-gateway/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Action Gateway Generated on 4 Dec 2026 Action Gateway gives AI agents governed access to tools over the Model Context Protocol (MCP). The `/v2/action-gateway` endpoints manage the tool catalog and the resources that control how agents use it: - **Tools** browse and search the catalog, its providers, and global provider and tool health. - **Toolbelts** are versioned, team-owned sets of tools that sessions and policies reference as `toolbelt:@`. - **Output views** reshape a tool's output before it reaches the agent. - **MCP servers** register your own remote MCP servers and choose which of their tools to enable. - **Connections** authorize one of your end users to use a provider's tools, for example through OAuth. - **Sessions** bind a tool selection and permission policy to an MCP URL that an agent connects to. - **Users** and **end user limits** show and limit activity per end user, identified by a session's `actorId`. To find and call tools in a session, use the [Action Gateway Data Plane](https://docs.digitalocean.com/reference/api/reference/action-gateway-data-plane/index.html.md) endpoints or connect an MCP client to the session's `mcpUrl`. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [Get an Actor's Limits](#actorLimits_get) - **POST** [Clear an Actor's Limits](#actorLimits_delete) - **POST** [Set an Actor's Limits](#actorLimits_update) - **GET** [List Provider Credentials](#providerCredentials_list) - **POST** [Create a Provider Credential](#providerCredentials_create) - **GET** [Get a Provider Credential](#providerCredentials_get) - **PATCH** [Update a Provider Credential](#providerCredentials_update) - **DELETE** [Delete a Provider Credential](#providerCredentials_delete) - **GET** [List Connections](#connections_list) - **POST** [Create a Connection](#connections_create) - **GET** [Get a Connection](#connections_get) - **DELETE** [Delete a Connection](#connections_delete) - **GET** [List MCP Servers](#mcpServers_list) - **POST** [Register an MCP Server](#mcpServers_create) - **GET** [Get an MCP Server](#mcpServers_get) - **PATCH** [Update an MCP Server](#mcpServers_patch) - **DELETE** [Delete an MCP Server](#mcpServers_delete) - **POST** [Discover an MCP Server's Tools](#mcpServers_run_resync) - **GET** [List an MCP Server's Tools](#mcpServers_list_tools) - **PUT** [Set Which of an MCP Server's Tools Are Enabled](#mcpServers_update_tools) - **GET** [List Output Views](#outputViews_list) - **POST** [Create an Output View](#outputViews_create) - **POST** [Preview an Output View](#outputViews_validate) - **GET** [Get an Output View](#outputViews_get) - **DELETE** [Delete an Output View](#outputViews_delete) - **GET** [List Endpoints](#endpoints_list) - **POST** [Create an Endpoint](#endpoints_create) - **GET** [Search Endpoints](#endpoints_list_search) - **GET** [Retrieve an Endpoint](#endpoints_get) - **PATCH** [Update an Endpoint](#endpoints_patch) - **DELETE** [Delete an Endpoint](#endpoints_delete) - **GET** [List Endpoint Versions](#endpointVersions_list) - **POST** [Create an Endpoint Version](#endpointVersions_create) - **POST** [Promote an Endpoint Version](#endpointVersions_create_promotion) - **GET** [Retrieve an Endpoint Version](#endpointVersions_get) - **DELETE** [Delete an Endpoint Version](#endpointVersions_delete) - **GET** [List Sessions](#sessions_list) - **POST** [Create a Session](#sessions_create) - **GET** [Search Sessions](#sessions_list_search) - **DELETE** [Delete a Session](#sessions_delete) - **GET** [List Toolbelts](#toolbelts_list) - **POST** [Create a Toolbelt](#toolbelts_create) - **GET** [Search Toolbelts](#toolbelts_list_search) - **GET** [Get a Toolbelt](#toolbelts_get) - **DELETE** [Delete a Toolbelt](#toolbelts_delete) - **GET** [List the Providers in a Toolbelt](#toolbelts_list_providers) - **GET** [List a Toolbelt's Tools from One Provider](#toolbelts_list_provider_tools) - **POST** [Add Tools to a Toolbelt](#toolbelts_add_tools) - **POST** [Remove Tools from a Toolbelt](#toolbelts_delete_tools) - **GET** [List Tools](#tools_list) - **GET** [List Tool Health](#tools_list_health) - **GET** [List Provider Health](#tools_list_health_providers) - **GET** [Get Tool Health](#tools_get_health) - **GET** [List Tool Versions](#tools_list_versions) - **GET** [List Providers](#tools_list_providers) - **GET** [Search Providers](#tools_list_search_providers) - **GET** [Search Tools](#tools_list_search) - **GET** [List Toolkits](#tools_list_toolkits) - **GET** [List Users](#users_list) - **GET** [Get a User](#users_get) ## GET Get an Actor's Limits `/v2/action-gateway/actors/{actor_id}/limits` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: action_gateway:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Returns the per-minute limits set for the actor and the limits in effect, each the lower of your team's limit and the actor's override. Returns 404 when the actor has no sessions, connections, or limit overrides. #### Path Parameters `actor_id` string required Example: `alice` Actor ID: a session `actor_id` or a connection `user_id`, 1 to 64 characters from `[A-Za-z0-9._-]`. ##### Request: `/v2/action-gateway/actors/{actor_id}/limits` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/actors/alice/limits" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `configured_limits` array of object optional Overrides set for the actor; categories without one are omitted. **Show child properties** `category` string required The category the limit applies to. `requests_per_minute` string (uint64) required Example: `30` Calls allowed per minute. 0 blocks every call in the category. `effective_limits` object optional Limits in effect for the actor in every category: the lower of your team's limit and the actor's override. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "configured_limits": [ { "category": "LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE", "requests_per_minute": "10" } ], "effective_limits": { "native_tool_calls_requests_per_minute": "600", "non_native_tool_calls_requests_per_minute": "600", "web_fetch_requests_per_minute": "120", "web_search_requests_per_minute": "10" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Clear an Actor's Limits `/v2/action-gateway/actors/{actor_id}/limits:clear` Removes the actor's overrides for the listed categories, which then follow your team's limits again. Clearing a category without an override succeeds. #### Path Parameters `actor_id` string required Example: `alice` Actor ID: a session `actor_id` or a connection `user_id`, 1 to 64 characters from `[A-Za-z0-9._-]`. #### Request Body: `application/json` `categories` array of string, one of: LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE, LIMIT_CATEGORY_WEB_FETCH_REQUESTS_PER_MINUTE, LIMIT_CATEGORY_NATIVE_TOOL_CALLS_REQUESTS_PER_MINUTE, LIMIT_CATEGORY_NON_NATIVE_TOOL_CALLS_REQUESTS_PER_MINUTE required Example: `["LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE"]` Required. Categories to clear, each at most once. ##### Request: `/v2/action-gateway/actors/{actor_id}/limits:clear` ### Payload Content type `application/json` ```json { "categories": [ "LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"categories":["LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE"]}' \ "https://api.digitalocean.com/v2/action-gateway/actors/alice/limits:clear" ``` #### Responses **200** The overrides were removed. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json {} ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Set an Actor's Limits `/v2/action-gateway/actors/{actor_id}/limits:set` Sets per-minute limits for the listed categories and leaves the others unchanged. A limit may not exceed your team's current limit for the category (400 otherwise), and 0 blocks every call in the category. The actor does not need to exist yet. #### Path Parameters `actor_id` string required Example: `alice` Actor ID: a session `actor_id` or a connection `user_id`, 1 to 64 characters from `[A-Za-z0-9._-]`. #### Request Body: `application/json` `overrides` array of object required Required. Limits to set, at most one per category. **Show child properties** `category` string required The category the limit applies to. `requests_per_minute` string (uint64) required Example: `30` Calls allowed per minute. 0 blocks every call in the category. ##### Request: `/v2/action-gateway/actors/{actor_id}/limits:set` ### Payload Content type `application/json` ```json { "overrides": [ { "category": "LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE", "requests_per_minute": "10" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"overrides":[{"category":"LIMIT_CATEGORY_WEB_SEARCH_REQUESTS_PER_MINUTE","requests_per_minute":"10"}]}' \ "https://api.digitalocean.com/v2/action-gateway/actors/alice/limits:set" ``` #### Responses **200** The overrides were set. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json {} ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Provider Credentials `/v2/action-gateway/provider-credentials` Lists registered credentials visible to you, ordered by provider and display name. Optionally filter by provider slug, ignoring case. An unknown provider returns an empty list. Results are not paginated and exclude DigitalOcean-owned OAuth applications and credentials managed by MCP server registrations. #### Query Parameters `provider` string optional Example: `example-provider` Optional provider slug, matched case-insensitively. Omit to list credentials for all providers. ##### Request: `/v2/action-gateway/provider-credentials` ### Curl ```bash curl --request GET \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/provider-credentials?provider=" ``` #### Responses **200** The request was successful. Secret material is not returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credentials` array of object optional Credentials ordered by provider and display name, excluding DigitalOcean-owned OAuth applications. **Show child properties** `base_url` string optional Example: `https://api.example.com` Normalized HTTPS origin for this credential's provider API, when configured. `created_at` string (date-time) optional Example: `2026-11-01T12:00:00Z` When the credential was created. `discovery` object optional Authorization to discover a team-scoped MCP server's tools, when required. This authorization is not used to invoke tools. `display_name` string optional Example: `Production key` Label, unique among the team's credentials for this provider, ignoring case. `id` string optional Example: `example-credential-id` Opaque ID used to select, retrieve, update, or delete the credential. `kind` string (enum) optional Example: `PROVIDER_CREDENTIAL_KIND_API_KEY` Credential type. NONE, NO_AUTH, and USER_API_KEY describe MCP server credentials; NO_AUTH and USER_API_KEY are output-only values. `owning_user_id` string optional Example: `example-digitalocean-user-id` DigitalOcean user ID of the creator. Absent for a credential shared with the team. `provider` string optional Example: `example-provider` Provider slug. `redirect_url` string optional OAuth redirect URI supplied at registration. Empty when using DigitalOcean's callback or when the credential is not an OAuth client. `reusable_by_team` boolean optional Example: `false` Whether everyone on the team can see and use the credential instead of only its creator. `scope` string, one of: user, team optional Example: `user` Who can use the credential, either its creator (user) or the whole team (team). `status` string, one of: PROVIDER_CREDENTIAL_STATUS_UNSPECIFIED, PROVIDER_CREDENTIAL_STATUS_ACTIVE, PROVIDER_CREDENTIAL_STATUS_DISABLED, PROVIDER_CREDENTIAL_STATUS_DELETED optional Example: `PROVIDER_CREDENTIAL_STATUS_ACTIVE` Credential lifecycle state. Disabled credentials cannot be used by existing or new connections and cannot be re-enabled through this API. DELETED is returned only by deletion. `updated_at` string (date-time) optional Example: `2026-11-01T12:00:00Z` When the credential was last modified. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credentials": [ { "base_url": "", "created_at": "2026-11-01T12:00:00Z", "display_name": "Production key", "id": "example-credential-id", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "owning_user_id": "example-digitalocean-user-id", "provider": "example-provider", "redirect_url": "", "reusable_by_team": false, "scope": "user", "status": "PROVIDER_CREDENTIAL_STATUS_ACTIVE", "updated_at": "2026-11-01T12:00:00Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Provider Credential `/v2/action-gateway/provider-credentials` Stores an API key or OAuth client for a catalog provider that supports that credential type. Secret material is write-only. Only you can see and use the credential unless you share it with your team using `reusable_by_team`. To use an API key, first create this credential, then create a connection for the same provider with `credential.team_credential.credential_id` set to the returned `credential.id`. That connection becomes active without OAuth consent. Its `user_id` must match the session's `actor_id`. Creating a credential does not replace existing credentials or connections. A duplicate display name for the same provider returns 409. #### Request Body: `application/json` **Option 1** `kind` string, one of: PROVIDER_CREDENTIAL_KIND_API_KEY optional **Option 2** `kind` string, one of: PROVIDER_CREDENTIAL_KIND_OAUTH_CLIENT optional **Option 3** `kind` string, one of: PROVIDER_CREDENTIAL_KIND_NONE optional ##### Request: `/v2/action-gateway/provider-credentials` ### Payload Content type `application/json` ```json { "api_key": "\u003cprovider-api-key\u003e", "display_name": "Production key", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "provider": "example-provider" } ``` ### Curl ```bash curl --request POST \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ --data '{"provider":"","display_name":"Production key","kind":"PROVIDER_CREDENTIAL_KIND_API_KEY","api_key":""}' \ "https://api.digitalocean.com/v2/action-gateway/provider-credentials" ``` #### Responses **200** The request was successful. Secret material is not returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credential` object optional The registered or deleted credential, without secret material. `revoked_connections` integer (int32) optional Example: `0` Number of connections deleted with the credential. Always zero for create, get, and update operations. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credential": { "base_url": "", "created_at": "2026-11-01T12:00:00Z", "display_name": "Production key", "id": "example-credential-id", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "owning_user_id": "example-digitalocean-user-id", "provider": "example-provider", "redirect_url": "", "reusable_by_team": false, "scope": "user", "status": "PROVIDER_CREDENTIAL_STATUS_ACTIVE", "updated_at": "2026-11-01T12:00:00Z" }, "revoked_connections": 0 } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Provider Credential `/v2/action-gateway/provider-credentials/{id}` Returns metadata for a provider credential, never its secret material. Returns 404 if the credential is unknown, deleted, or not visible to you. #### Path Parameters `id` string required Example: `example-credential-id` Provider credential ID returned when the credential was created. ##### Request: `/v2/action-gateway/provider-credentials/{id}` ### Curl ```bash curl --request GET \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/provider-credentials/" ``` #### Responses **200** The request was successful. Secret material is not returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credential` object optional The registered or deleted credential, without secret material. `revoked_connections` integer (int32) optional Example: `0` Number of connections deleted with the credential. Always zero for create, get, and update operations. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credential": { "base_url": "", "created_at": "2026-11-01T12:00:00Z", "display_name": "Production key", "id": "example-credential-id", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "owning_user_id": "example-digitalocean-user-id", "provider": "example-provider", "redirect_url": "", "reusable_by_team": false, "scope": "user", "status": "PROVIDER_CREDENTIAL_STATUS_ACTIVE", "updated_at": "2026-11-01T12:00:00Z" }, "revoked_connections": 0 } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update a Provider Credential `/v2/action-gateway/provider-credentials/{id}` Rotates an API key or OAuth client secret, or updates credential metadata, in place. Send only the fields to change; omitted fields are preserved. No update mask is required. The provider, kind, and redirect URL cannot be changed. The credential keeps its ID and its connections. Those connections use the new material on subsequent calls; `revoked_connections` remains zero. For an OAuth client, changing secret material or the base URL requires the original `client_id`. Credentials managed by MCP server registrations accept only secret rotation, not display name or base URL changes. Sharing with the team requires the appropriate account feature and permissions and cannot be undone. #### Path Parameters `id` string required Example: `example-credential-id` Provider credential ID returned when the credential was created. #### Request Body: `application/json` `api_key` string optional write-only Example: `` New API key. Only valid for API-key credentials. Never returned. `base_url` string optional Example: `https://api.example.com` New HTTPS origin, validated as on creation. An empty string clears it unless the provider requires an origin. OAuth client updates also require client_id. `client_id` string optional Example: `example-client-id` OAuth clients only. Required when changing client_id, client_secret, or base_url. Must match the originally registered client ID; a different ID is rejected. Register another credential to use a different OAuth client. `client_secret` string optional write-only Example: `` New OAuth client secret. Requires client_id. Never returned. `credential_parameters` object optional Example: `{"subdomain":"example"}` Non-secret configuration for API-key providers that declare credential parameters. Validated against the provider's parameter definitions and used to derive base_url. Rejected for other credential kinds. `display_name` string optional Example: `Production key` New label, unique among the team's credentials for this provider, ignoring case. `reusable_by_team` boolean, one of: true optional Example: `true` Set to true to share a credential with the team. Requires team-scoped provider credentials to be enabled and the team owner role to share a private credential. Sharing cannot be undone; false is rejected. ##### Request: `/v2/action-gateway/provider-credentials/{id}` ### Payload Content type `application/json` ```json { "api_key": "\u003creplacement-provider-api-key\u003e" } ``` ### Curl ```bash curl --request PATCH \ --header "Content-Type: application/json" \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ --data '{"api_key":""}' \ "https://api.digitalocean.com/v2/action-gateway/provider-credentials/" ``` #### Responses **200** The request was successful. Secret material is not returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credential` object optional The registered or deleted credential, without secret material. `revoked_connections` integer (int32) optional Example: `0` Number of connections deleted with the credential. Always zero for create, get, and update operations. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credential": { "base_url": "", "created_at": "2026-11-01T12:00:00Z", "display_name": "Production key", "id": "example-credential-id", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "owning_user_id": "example-digitalocean-user-id", "provider": "example-provider", "redirect_url": "", "reusable_by_team": false, "scope": "user", "status": "PROVIDER_CREDENTIAL_STATUS_ACTIVE", "updated_at": "2026-11-01T12:00:00Z" }, "revoked_connections": 0 } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Provider Credential `/v2/action-gateway/provider-credentials/{id}` Deletes a provider credential and every connection that uses it. There is no confirmation step. Warn affected users before deleting; sessions relying on those connections lose provider access. To rotate a key without removing connections, update the credential instead. Returns the deleted credential with status `PROVIDER_CREDENTIAL_STATUS_DELETED` and the number of removed connections in `revoked_connections`. Returns 404 for an unknown or already-deleted credential. A credential still bound to an MCP server cannot be deleted separately; delete the server first. #### Path Parameters `id` string required Example: `example-credential-id` Provider credential ID returned when the credential was created. ##### Request: `/v2/action-gateway/provider-credentials/{id}` ### Curl ```bash curl --request DELETE \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/provider-credentials/" ``` #### Responses **200** The credential and its connections were deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credential` object optional The registered or deleted credential, without secret material. `revoked_connections` integer (int32) optional Example: `0` Number of connections deleted with the credential. Always zero for create, get, and update operations. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credential": { "created_at": "2026-11-01T12:00:00Z", "display_name": "Production key", "id": "example-credential-id", "kind": "PROVIDER_CREDENTIAL_KIND_API_KEY", "owning_user_id": "example-digitalocean-user-id", "provider": "example-provider", "reusable_by_team": false, "scope": "user", "status": "PROVIDER_CREDENTIAL_STATUS_DELETED", "updated_at": "2026-11-01T13:00:00Z" }, "revoked_connections": 1 } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Connections `/v2/action-gateway/connections` Returns the connections you can see, excluding revoked ones. Offset-paged with page and `per_page`; filter by provider, `user_id`, and status. #### Query Parameters `provider` string optional Example: `jira` Optional provider slug, matched exactly. `user_id` string optional Example: `alice` Optional substring of `user_id`. It must use the `user_id` alphabet, `[A-Za-z0-9._-]`. `status` string, one of: pending, active, expired optional Example: `active` pending|active|revoked|expired. List results always omit revoked connections, including when this filter is revoked. `sort` string, one of: created_at, provider, user_id, status optional Example: `created_at` `created_at`, provider, `user_id`, or status. Defaults to provider, then `user_id`. `sort_direction` string, one of: asc, desc optional Example: `desc` asc (the default) or desc. `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/connections` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/connections?provider=jira" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `connections` array of object optional Connections on this page. **Show child properties** `api_key` object optional Set for `team_api_key` connections. `connection_parameters` object optional Nullable Example: `{"site_url":"https://example.atlassian.net"}` Non-sensitive provider configuration. `created_at` string (date-time) optional Nullable Example: `2026-07-14T00:50:00Z` When the connection was created. `credential_id` string optional Empty for `digitalocean_oauth`; otherwise the ID of the team provider credential the connection uses. `credential_kind` string, one of: digitalocean_oauth, private_oauth, team_api_key optional Example: `digitalocean_oauth` `digitalocean_oauth`, `private_oauth`, or `team_api_key`. `granted_at` string (date-time) optional Deprecated Nullable Example: `2026-07-14T00:52:10Z` Deprecated: read `oauth.granted_at`. `id` string (uuid) optional Example: `39f9f768-a7f9-4c91-9557-3328c53dd054` Opaque connection ID. `network` object optional Private network the connection's calls use, when configured. `oauth` object optional Set for `digitalocean_oauth` and `private_oauth` connections. **Show child properties** `granted_at` string (date-time) optional Nullable Example: `2026-07-14T00:52:10Z` When the user completed authorization. `scopes` array of string optional Example: `["write:jira-work"]` Provider scopes granted, or requested while pending. `owning_user_id` string optional Example: `2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c` DigitalOcean user ID of the user who created the connection, when recorded. `provider` string optional Example: `jira` Provider slug, for example `jira`. `provider_display_name` string optional Example: `Jira` Human-readable provider name, for example `Jira`. `revoked_at` string (date-time) optional Nullable When the connection was revoked. `scopes` array of string optional Deprecated Example: `["write:jira-work"]` Deprecated: read `oauth.scopes`. Duplicated here so a reader of the pre-union shape keeps working; empty for a kind with no OAuth grant. `status` string, one of: pending, active, revoked, expired optional Example: `active` pending, active, revoked, or expired. `updated_at` string (date-time) optional Nullable Example: `2026-07-14T00:52:10Z` When the connection was last modified. `user_id` string optional Example: `alice` Your identifier for the user the connection acts for. `pagination` object optional Paging applied to this response and the total number of connections. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "connections": [ { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "created_at": "2026-07-14T00:50:00Z", "credential_id": "", "credential_kind": "digitalocean_oauth", "granted_at": "2026-07-14T00:52:10Z", "id": "39f9f768-a7f9-4c91-9557-3328c53dd054", "network": null, "oauth": { "granted_at": "2026-07-14T00:52:10Z", "scopes": [ "write:jira-work" ] }, "provider": "jira", "provider_display_name": "Jira", "revoked_at": null, "scopes": [ "write:jira-work" ], "status": "active", "updated_at": "2026-07-14T00:52:10Z", "user_id": "alice" } ], "pagination": { "page": 1, "per_page": 20, "total": 1 } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Connection `/v2/action-gateway/connections` Connects one of your users, identified by `user_id`, to a provider so tools can act on their account. An OAuth connection starts pending, and authorization carries the URL to send the user to; read the connection until it is active or expired. A connection through a team API-key credential is active immediately. Register the API key with `POST /v2/action-gateway/provider-credentials` first, then set `credential.team_credential.credential_id` to the returned `credential.id`. There is one connection per provider and `user_id` for each DigitalOcean user who creates connections. Repeating the request returns the existing connection when its scopes cover the request, reusing a pending connection's link, and restarts an expired or revoked connection under the same ID. Requesting scopes beyond an existing connection's, or a different credential, returns 400 until that connection is deleted. #### Request Body: `application/json` `connection_parameters` object optional Example: `{"site_url":"https://example.atlassian.net"}` Values for the provider's `connection_parameters`, validated against their specifications. `credential` object optional Optional credential to connect through. Omitted uses DigitalOcean's shared OAuth application. **Show child properties** `digitalocean_oauth` object optional Use DigitalOcean's shared OAuth application. `team_credential` object optional Use one of your team's provider credentials. **Show child properties** `credential_id` string optional Example: `8d6f2b1a-3c4e-4d5f-9a8b-7c6d5e4f3a2b` Required. ID of an active provider credential for the same provider that you can use. `network` object optional Optional private network for the connection's calls. Requires VPC networking to be enabled for your account (403 otherwise). **Show child properties** `vpc` object optional Route through a VPC. **Show child properties** `destinations` array of object optional Private hosts the connection's calls may reach through the VPC. At least one is required. **Show child properties** `allowed_ip_cidrs` array of string optional Example: `["10.116.0.0/20"]` Optional CIDR ranges; when set, every address the host resolves to must fall within one of them. `host` string optional Example: `jira.internal.example.com` Host name or IP address. It must resolve only to private addresses. `port` integer (uint32) optional Example: `443` Port, 1 to 65535. `vpc_uuid` string (uuid) optional Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team. `provider` string required Example: `jira` Required provider slug, from the provider list. `scopes` array of string optional Example: `["write:jira-work"]` Optional OAuth scopes to request. Defaults to every scope the provider offers; scopes outside that set are rejected. Ignored for API-key credentials. `user_id` string required Example: `alice` Required. Your identifier for the user the connection acts for: 1 to 64 characters from `[A-Za-z0-9._-]`. A session whose `actor_id` equals it uses this connection. ##### Request: `/v2/action-gateway/connections` ### Payload Content type `application/json` Example ```json { "credential": { "team_credential": { "credential_id": "example-credential-id" } }, "provider": "example-provider", "user_id": "user-123" } ``` ```json { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "credential": { "digitalocean_oauth": {} }, "provider": "jira", "scopes": [ "write:jira-work" ], "user_id": "alice" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"provider":"jira","user_id":"alice","scopes":["write:jira-work"],"connection_parameters":{"site_url":"https://example.atlassian.net"},"credential":{"digitalocean_oauth":{}}}' \ "https://api.digitalocean.com/v2/action-gateway/connections" ``` #### Responses **200** The connection was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Present only while the connection is pending. `connection` object optional The connection. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": { "connect_url": "https://cloud.digitalocean.com/security/connectlinks/confirm?token=eyJhbGciOi", "expires_at": "2026-07-14T01:00:00Z", "status": "requires_authorization", "verification_code": "97rwxzcy" }, "connection": { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "created_at": "2026-07-14T00:50:00Z", "credential_id": "", "credential_kind": "digitalocean_oauth", "granted_at": null, "id": "39f9f768-a7f9-4c91-9557-3328c53dd054", "network": null, "oauth": { "granted_at": null, "scopes": [ "write:jira-work" ] }, "provider": "jira", "provider_display_name": "Jira", "revoked_at": null, "scopes": [ "write:jira-work" ], "status": "pending", "updated_at": "2026-07-14T00:50:00Z", "user_id": "alice" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Connection `/v2/action-gateway/connections/{id}` Returns the connection and, while it is pending, the authorization the user still has to complete. Reading a pending connection picks up a completed authorization, and marks the connection expired once its link has lapsed. Returns 404 for an unknown connection or one you cannot see. #### Path Parameters `id` string required Example: `39f9f768-a7f9-4c91-9557-3328c53dd054` Connection ID. ##### Request: `/v2/action-gateway/connections/{id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/connections/39f9f768-a7f9-4c91-9557-3328c53dd054" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Present only while the connection is pending and you created it. `connection` object optional The connection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": null, "connection": { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "created_at": "2026-07-14T00:50:00Z", "credential_id": "", "credential_kind": "digitalocean_oauth", "granted_at": "2026-07-14T00:52:10Z", "id": "39f9f768-a7f9-4c91-9557-3328c53dd054", "network": null, "oauth": { "granted_at": "2026-07-14T00:52:10Z", "scopes": [ "write:jira-work" ] }, "provider": "jira", "provider_display_name": "Jira", "revoked_at": null, "scopes": [ "write:jira-work" ], "status": "active", "updated_at": "2026-07-14T00:52:10Z", "user_id": "alice" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Connection `/v2/action-gateway/connections/{id}` Marks the connection revoked and returns it; for an OAuth connection, its stored tokens are deleted first. Creating a connection for the same provider and `user_id` later reuses the same ID. Only the user who created the connection can delete it; for anyone else it is 404. #### Path Parameters `id` string required Example: `39f9f768-a7f9-4c91-9557-3328c53dd054` Connection ID. ##### Request: `/v2/action-gateway/connections/{id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/connections/39f9f768-a7f9-4c91-9557-3328c53dd054" ``` #### Responses **200** The connection was revoked. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `connection` object optional The resulting revoked connection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "connection": { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "created_at": "2026-07-14T00:50:00Z", "credential_id": "", "credential_kind": "digitalocean_oauth", "granted_at": "2026-07-14T00:52:10Z", "id": "39f9f768-a7f9-4c91-9557-3328c53dd054", "network": null, "oauth": { "granted_at": "2026-07-14T00:52:10Z", "scopes": [ "write:jira-work" ] }, "provider": "jira", "provider_display_name": "Jira", "revoked_at": "2026-08-01T09:00:00Z", "scopes": [ "write:jira-work" ], "status": "revoked", "updated_at": "2026-08-01T09:00:00Z", "user_id": "alice" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List MCP Servers `/v2/action-gateway/mcp-servers` Returns every MCP server your team has registered, sorted by `serverRef`. ##### Request: `/v2/action-gateway/mcp-servers` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpServers` array of object optional Servers sorted by `serverRef`. **Show child properties** `createdAt` string optional Example: `2026-09-20T15:00:00Z` When the server was registered, in RFC 3339 format. `credentialRef` string optional Example: `action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c` The secret reference supplied at registration when source=secret, or the team's OAuth credential ID when source=connection. Empty when the server was registered with an `api_key`, whose storage DigitalOcean manages. `credentialRefSource` string, one of: none, secret, connection optional Example: `secret` How requests to the server authenticate: none, secret (a key or token sent in the Authorization header), or connection (each user's own OAuth authorization). `description` string optional Example: `Internal documentation search.` Team-authored description, shown on the server's catalog card. A resync does not replace it. `endpoint` string optional Example: `https://mcp.example.com/mcp` HTTPS URL of the server's MCP endpoint. `lastSyncedAt` string optional Example: `2026-09-20T15:04:05Z` When discovery last succeeded, in RFC 3339 format; empty until the first success. `oauth_authorization_ttl_seconds` string (uint64) optional Example: `0` How long a user's authorization is reused before re-consent. Echoed so a team can read the window without re-registering to discover it. `oauth_authorize_url` string optional OAuth authorization endpoint. Set only when `credentialRefSource` is connection; the client secret is never returned. `oauth_scopes` array of string optional Example: `[]` OAuth scopes requested from each user. Set only when `credentialRefSource` is connection. `protocolVersion` string optional Example: `2025-06-18` MCP protocol revision negotiated with the server. `serverRef` string optional Example: `docs` Server identifier, unique within your team. The server's tool slugs are `_`. `syncError` string optional Why the latest discovery failed; empty after a successful one. `syncStatus` string, one of: pending, ok, failed, unsupported_protocol optional Example: `ok` Outcome of the latest discovery: pending (no discovery has finished yet), ok, failed, or `unsupported_protocol`. It is not reset while a resync runs. `toolCount` integer (int32) optional Example: `3` Number of tools discovered on the server, whether enabled or not. `transport` string, one of: streamable_http optional Example: `streamable_http` Always `streamable_http`. `updatedAt` string optional Example: `2026-09-20T15:04:05Z` When the server was last modified, in RFC 3339 format. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpServers": [ { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "ok", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-20T15:04:05Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Register an MCP Server `/v2/action-gateway/mcp-servers` Registers a remote MCP server for your team, using the streamable HTTP transport. The server starts with `syncStatus` pending and no tools: discover its tools with `POST .../mcp-servers/{server_ref}/resync`, then choose which to enable with `PUT .../mcp-servers/{server_ref}/tools`. The endpoint must be HTTPS and resolve only to public IP addresses. The number of servers per team is limited (10 by default); registering beyond it returns 429. Returns 409 when `serverRef` is already in use. #### Request Body: `application/json` `api_key` string optional write-only Example: `sk_live_example` For `credentialRefSource` secret: the key or token itself. DigitalOcean stores it; it is write-only and no response returns it. Set exactly one of `credentialRef` and `api_key`. `credentialRef` string optional For `credentialRefSource` secret: a reference to a secret your team stores with DigitalOcean. Must match `^`\[A-Za-z0-9]\`\`\[A-Za-z0-9:/_.-]`{0,254}$`. Set exactly one of `credentialRef` and `api_key`. `credentialRefSource` string, one of: none, secret, connection optional Example: `secret` How requests to the server authenticate: none (the default), secret, or connection. With secret, the value from `credentialRef` or `api_key` is sent in the Authorization header, prefixed with "Bearer " unless it already contains a space. `description` string optional Example: `Internal documentation search.` Optional description shown on the server's catalog card. At most 1024 characters. `endpoint` string required Example: `https://mcp.example.com/mcp` HTTPS URL of the server's MCP endpoint. Its host must resolve only to public IP addresses. Required. `oauth_authorization_ttl_seconds` string (uint64) optional Example: `86400` How long, in seconds, a user's authorization may be reused before they must consent again. Optional; 0 means 30 days, and the maximum is 100 years. Authorizations are not refreshed automatically, so this window, not the provider's token lifetime, decides how often a user is sent back through consent. Set it no longer than the provider's own token lifetime, so the prompt arrives before a tool call fails against an expired token. `oauth_authorize_url` string optional Required for `credentialRefSource` connection: the OAuth authorization endpoint. It must use the endpoint's scheme and port, on the endpoint's host or another host under the same registrable domain. `oauth_client_id` string optional Required for `credentialRefSource` connection: the client ID of your team's OAuth client for the server. Each user of the server then authorizes individually. `oauth_client_secret` string optional write-only Required for `credentialRefSource` connection. Write-only; no response returns it. `oauth_scopes` array of string optional Example: `[]` Required for `credentialRefSource` connection: the scopes to request from each user, 1 to 64 of them. `oauth_token_url` string optional Required for `credentialRefSource` connection: the OAuth token endpoint, under the same rules as `oauth_authorize_url`. `serverRef` string required Example: `docs` Identifier for the server, unique within your team. Must match `^`\[a-z]\`\`\[a-z0-9-]`{0,63}$`. `transport` string, one of: streamable_http optional Example: `streamable_http` Optional. `streamable_http`, the default and only accepted value. ##### Request: `/v2/action-gateway/mcp-servers` ### Payload Content type `application/json` ```json { "api_key": "sk_live_example", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "serverRef": "docs" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"serverRef":"docs","endpoint":"https://mcp.example.com/mcp","credentialRefSource":"secret","api_key":"sk_live_example","description":"Internal documentation search."}' \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers" ``` #### Responses **200** The MCP server was registered. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpServer` object optional The MCP server. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "", "serverRef": "docs", "syncError": "", "syncStatus": "pending", "toolCount": 0, "transport": "streamable_http", "updatedAt": "2026-09-20T15:00:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get an MCP Server `/v2/action-gateway/mcp-servers/{server_ref}` Returns one of your team's MCP servers, or 404 when your team has none with this `serverRef`. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpServer` object optional The MCP server. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "ok", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-20T15:04:05Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update an MCP Server `/v2/action-gateway/mcp-servers/{server_ref}` Changes the server's description, which is shown on its catalog card immediately. The endpoint and credentials cannot be changed; to change them, delete the server and register it again. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. #### Request Body: `application/json` `description` string optional Example: `Internal documentation and runbook search.` Replaces the stored description; empty clears it. At most 1024 characters. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}` ### Payload Content type `application/json` ```json { "description": "Internal documentation and runbook search." } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"description":"Internal documentation and runbook search."}' \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpServer` object optional The MCP server. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation and runbook search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "ok", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-21T10:00:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an MCP Server `/v2/action-gateway/mcp-servers/{server_ref}` Disables all of the server's tools, removes them from your team's catalog, and deletes the server. An `api_key` supplied at registration is deleted; a `credentialRef` you supplied is left untouched. For a server registered with `credentialRefSource` connection, every user connection made through its OAuth client is revoked. Returns the deleted server, or 404 when it does not exist. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs" ``` #### Responses **200** The MCP server was deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpServer` object optional The MCP server. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "ok", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-20T15:04:05Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Discover an MCP Server's Tools `/v2/action-gateway/mcp-servers/{server_ref}/resync` Connects to the server, lists its tools, and records them. Discovered tools are not callable until you enable them. When discovery finishes in time, returns 200 with the server and its tools; a discovery failure is reported in `syncStatus` and `syncError` rather than as an error. Otherwise returns 202 with pending set while discovery continues: poll `GET .../mcp-servers/{server_ref}` until `lastSyncedAt` or `syncError` changes (`syncStatus` is not reset while discovery runs). For a server registered with `credentialRefSource` connection, `user_id` is required; if that user has not authorized the server yet, the response carries authorization with the URL to send them to. Resyncs are rate limited per team, and a team can run only a few discoveries at once; either limit returns 429. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. #### Request Body: `application/json` `user_id` string optional Example: `alice` Required for a server registered with `credentialRefSource` connection: discovery reaches the server as this user, through their connection, because such a server has no team-wide credential. Ignored otherwise. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}/resync` ### Payload Content type `application/json` ```json {} ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{}' \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs/resync" ``` #### Responses **200** Discovery finished. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Set when discovery could not run because `user_id` has no authorized connection to this server yet. It carries the remedy — send the user to `connect_url` — so the caller acts on this response rather than parsing the server's `syncError`. `mcpServer` object optional The server, including `syncStatus` and `syncError`. `pending` boolean optional Example: `false` True when discovery is still running (HTTP 202). Poll the server to see the outcome. `tools` array of object optional Every tool discovered on the server when discovery finished in time; empty when pending is true. **Show child properties** `description` string optional Example: `Search the documentation index.` Tool description as the server reports it. `enabled` boolean optional Example: `true` Whether the tool is enabled in your team's catalog. `name` string optional Example: `search` Tool name as the server reports it, normalized to the catalog's naming rules. `quarantineReason` string optional Why the tool was quarantined; empty otherwise. `quarantined` boolean optional Example: `false` True when the enabled tool was suspended because it disappeared from the server or its input schema changed incompatibly. Calls to it fail until it is enabled again. `toolSlug` string optional Example: `docs_search` `_`: the tool's catalog slug, and the value to list in `enabledToolSlugs`. **202** Discovery is still running. Poll the MCP server for its syncStatus. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Set when discovery could not run because `user_id` has no authorized connection to this server yet. It carries the remedy — send the user to `connect_url` — so the caller acts on this response rather than parsing the server's `syncError`. `mcpServer` object optional The server, including `syncStatus` and `syncError`. `pending` boolean optional Example: `false` True when discovery is still running (HTTP 202). Poll the server to see the outcome. `tools` array of object optional Every tool discovered on the server when discovery finished in time; empty when pending is true. **Show child properties** `description` string optional Example: `Search the documentation index.` Tool description as the server reports it. `enabled` boolean optional Example: `true` Whether the tool is enabled in your team's catalog. `name` string optional Example: `search` Tool name as the server reports it, normalized to the catalog's naming rules. `quarantineReason` string optional Why the tool was quarantined; empty otherwise. `quarantined` boolean optional Example: `false` True when the enabled tool was suspended because it disappeared from the server or its input schema changed incompatibly. Calls to it fail until it is enabled again. `toolSlug` string optional Example: `docs_search` `_`: the tool's catalog slug, and the value to list in `enabledToolSlugs`. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": null, "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "ok", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-20T15:04:05Z" }, "pending": false, "tools": [ { "description": "Fetch one documentation page.", "enabled": false, "name": "get_page", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_get_page" }, { "description": "Search the documentation index.", "enabled": false, "name": "search", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_search" } ] } ``` **202** ```json { "authorization": null, "mcpServer": { "createdAt": "2026-09-20T15:00:00Z", "credentialRef": "action-infra/tool-credentials/mcp/docs/3f5b2c1e-9a7d-4e8b-b6c4-2d1f0e9a8b7c", "credentialRefSource": "secret", "description": "Internal documentation search.", "endpoint": "https://mcp.example.com/mcp", "lastSyncedAt": "2026-09-20T15:04:05Z", "oauth_authorization_ttl_seconds": "0", "oauth_authorize_url": "", "oauth_scopes": [], "protocolVersion": "2025-06-18", "serverRef": "docs", "syncError": "", "syncStatus": "pending", "toolCount": 2, "transport": "streamable_http", "updatedAt": "2026-09-20T15:04:05Z" }, "pending": true, "tools": [] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List an MCP Server's Tools `/v2/action-gateway/mcp-servers/{server_ref}/tools` Returns every tool discovered on the server, sorted by name, with whether each is enabled. Tools that have since disappeared from the server stay listed. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}/tools` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs/tools" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `tools` array of object optional Tools sorted by name. **Show child properties** `description` string optional Example: `Search the documentation index.` Tool description as the server reports it. `enabled` boolean optional Example: `true` Whether the tool is enabled in your team's catalog. `name` string optional Example: `search` Tool name as the server reports it, normalized to the catalog's naming rules. `quarantineReason` string optional Why the tool was quarantined; empty otherwise. `quarantined` boolean optional Example: `false` True when the enabled tool was suspended because it disappeared from the server or its input schema changed incompatibly. Calls to it fail until it is enabled again. `toolSlug` string optional Example: `docs_search` `_`: the tool's catalog slug, and the value to list in `enabledToolSlugs`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "tools": [ { "description": "Fetch one documentation page.", "enabled": true, "name": "get_page", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_get_page" }, { "description": "Search the documentation index.", "enabled": true, "name": "search", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_search" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Set Which of an MCP Server's Tools Are Enabled `/v2/action-gateway/mcp-servers/{server_ref}/tools` `enabledToolSlugs` is the complete set to enable; every other tool of the server is disabled. An enabled tool is added to your team's catalog at its latest discovered version, and a disabled one is removed from it. Repeating the same set changes nothing. Before changing anything, each tool being enabled, re-enabled, or moved to a newer discovered version is verified against the live server: it must still be listed there, with the same input schema as when it was discovered. If any check fails or the server cannot be reached, the request fails with 400 and nothing changes; resync and try again. An unknown tool slug is also rejected with 400. A request that needs verification counts against the resync rate limit (429). Returns the server's full tool list. #### Path Parameters `server_ref` string required Example: `docs` Server identifier (`serverRef`) of one of your team's MCP servers. #### Request Body: `application/json` `enabledToolSlugs` array of string required Example: `["docs_search","docs_get_page"]` The complete set of tool slugs (`_`) to enable; every other tool of the server is disabled. Empty disables every tool. `user_id` string optional Required for a server registered with `credentialRefSource` connection when a tool needs verification against the live server, which can only be reached as a user who has authorized it. Ignored otherwise. ##### Request: `/v2/action-gateway/mcp-servers/{server_ref}/tools` ### Payload Content type `application/json` ```json { "enabledToolSlugs": [ "docs_get_page" ] } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"enabledToolSlugs":["docs_get_page"]}' \ "https://api.digitalocean.com/v2/action-gateway/mcp-servers/docs/tools" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `tools` array of object optional Tools sorted by name. **Show child properties** `description` string optional Example: `Search the documentation index.` Tool description as the server reports it. `enabled` boolean optional Example: `true` Whether the tool is enabled in your team's catalog. `name` string optional Example: `search` Tool name as the server reports it, normalized to the catalog's naming rules. `quarantineReason` string optional Why the tool was quarantined; empty otherwise. `quarantined` boolean optional Example: `false` True when the enabled tool was suspended because it disappeared from the server or its input schema changed incompatibly. Calls to it fail until it is enabled again. `toolSlug` string optional Example: `docs_search` `_`: the tool's catalog slug, and the value to list in `enabledToolSlugs`. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "tools": [ { "description": "Fetch one documentation page.", "enabled": true, "name": "get_page", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_get_page" }, { "description": "Search the documentation index.", "enabled": false, "name": "search", "quarantineReason": "", "quarantined": false, "toolSlug": "docs_search" } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Output Views `/v2/action-gateway/output-views` Returns the output views your team can use: views DigitalOcean publishes to every team, plus your team's own. Cursor-paged with `page_size` and `page_token`; no total is reported. #### Query Parameters `tool` string optional Example: `exa_web_search` At most one of tool or `tool_id`, as on create. With one set, the list is the published views plus your team's own on that tool version. With neither, it is every live view your team owns plus every published view on a tool version your catalog exposes, across tools. `tool_id` string optional Example: `tul_exa_web_search` Opaque ID of the tool version; see tool. `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response. Valid only with the same tool selection; otherwise the request is rejected with 400. ##### Request: `/v2/action-gateway/output-views` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/output-views?tool=exa_web_search" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Empty on the last page. `tool` string optional Example: `exa_web_search` Tool slug of that version. Empty when the request named no tool. `tool_id` string optional Example: `tul_exa_web_search` The tool version the views are bound to, echoed so an unpinned request learns which version it resolved. Empty when the request named no tool. `version` string optional Example: `v1` Version of that tool, for example `v3`. Empty when the request named no tool. `views` array of object optional Ordered by tool version, then published views before your team's own, then name. **Show child properties** `audit` object optional Nullable Null on a preview, which stores nothing. **Show child properties** `createdAt` string (date-time) optional Nullable Example: `2026-09-01T16:00:00Z` When the resource was created. `deletedAt` string (date-time) optional Nullable Set once the resource is deleted. `updatedAt` string (date-time) optional Nullable Example: `2026-09-01T16:00:00Z` When the resource was last modified. `description` string optional Example: `Keep only result titles and URLs.` View description. `fields` array of string optional Example: `["results.title","results.url"]` The dotted output paths a projection keeps; arrays are traversed element-wise. Empty for a transform. `kind` string, one of: OUTPUT_VIEW_KIND_PROJECTION, OUTPUT_VIEW_KIND_TRANSFORM optional Example: `OUTPUT_VIEW_KIND_PROJECTION` `OUTPUT_VIEW_KIND_PROJECTION` or `OUTPUT_VIEW_KIND_TRANSFORM`. `name` string optional Example: `titles-and-urls` View name, unique per tool version among its owner's views. `output_schema` object optional Nullable The JSON Schema every result of this view satisfies. `team_id` string optional Example: `123456` Your team's ID on your team's views, and empty for a view DigitalOcean publishes to every team. `tool` string optional Example: `exa_web_search` The provider-qualified tool slug, for example `exa_search`. `tool_id` string optional Example: `tul_exa_web_search` The opaque identity of the exact tool version the view is bound to; tool and version are its readable coordinates. `version` string optional Example: `v1` The tool version, for example `v3`. `view_id` string optional Example: `ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7` Output view ID, for example `ov_` followed by 32 hex digits. Empty on a preview. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "views": [ { "audit": { "createdAt": "2026-09-01T16:00:00Z", "deletedAt": null, "updatedAt": "2026-09-01T16:00:00Z" }, "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "kind": "OUTPUT_VIEW_KIND_PROJECTION", "name": "titles-and-urls", "output_schema": { "properties": { "results": { "items": { "properties": { "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "team_id": "123456", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "view_id": "ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Output View `/v2/action-gateway/output-views` An output view is a named projection of one tool version's output: tool calls that use it return only the listed fields, and its `output_schema` describes the result. The view is bound to the tool version your catalog currently releases. Returns 409 when your team already has a view with this name on the tool version, and 429 when your team already has the maximum of 20 views on it. #### Request Body: `application/json` `description` string optional Example: `Keep only result titles and URLs.` Optional description. At most 512 bytes. `fields` array of string required Example: `["results.title","results.url"]` Output paths to keep, 1 to 64 of them. Each is a dotted path of up to 8 segments made of `[A-Za-z0-9_-]`, and must be declared by the tool's output schema; arrays are traversed element-wise. Paths may not repeat or be a prefix of one another. The tool version must declare an object output schema. `name` string required Example: `titles-and-urls` View name. Must match `^`\[a-z]\`\`\[a-z0-9_-]`{0,63}$` and be unique per tool version within your team. `tool` string optional Example: `exa_web_search` Exactly one of tool or `tool_id` selects the tool version. tool is a provider-qualified slug, optionally pinned as `@`. You can bind only the released version your catalog exposes: an unpinned slug resolves it and the response echoes it as version; a pin must equal it, and a `tool_id` (the opaque identity from tool search) must be that version. Any other version returns 404. `tool_id` string optional Opaque ID of the tool version; see tool. ##### Request: `/v2/action-gateway/output-views` ### Payload Content type `application/json` ```json { "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "name": "titles-and-urls", "tool": "exa_web_search" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tool":"exa_web_search","name":"titles-and-urls","description":"Keep only result titles and URLs.","fields":["results.title","results.url"]}' \ "https://api.digitalocean.com/v2/action-gateway/output-views" ``` #### Responses **200** The output view was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `view` object optional The output view. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "view": { "audit": { "createdAt": "2026-09-01T16:00:00Z", "deletedAt": null, "updatedAt": "2026-09-01T16:00:00Z" }, "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "kind": "OUTPUT_VIEW_KIND_PROJECTION", "name": "titles-and-urls", "output_schema": { "properties": { "results": { "items": { "properties": { "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "team_id": "123456", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "view_id": "ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Preview an Output View `/v2/action-gateway/output-views/preview` Validates a projection exactly as create does and returns the view it would produce, including `output_schema`, without storing anything. name and description are optional here; name uniqueness and the per-tool-version limit are not checked. #### Request Body: `application/json` `description` string optional Example: `Keep only result titles and URLs.` Optional description, validated as on create when present. `fields` array of string required Example: `["results.title","results.url"]` Output paths to keep; as on create. `name` string optional Example: `titles-and-urls` Optional view name, validated as on create when present. `tool` string optional Example: `exa_web_search` Tool slug, optionally pinned; as on create. `tool_id` string optional Opaque ID of the tool version; as on create. ##### Request: `/v2/action-gateway/output-views/preview` ### Payload Content type `application/json` ```json { "fields": [ "results.title", "results.url" ], "tool": "exa_web_search" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tool":"exa_web_search","fields":["results.title","results.url"]}' \ "https://api.digitalocean.com/v2/action-gateway/output-views/preview" ``` #### Responses **200** The output view is valid. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `view` object optional The output view. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "view": { "audit": null, "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "kind": "OUTPUT_VIEW_KIND_PROJECTION", "name": "titles-and-urls", "output_schema": { "properties": { "results": { "items": { "properties": { "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "team_id": "123456", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "view_id": "" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get an Output View `/v2/action-gateway/output-views/{view_id}` Returns one of your team's views, or a published view on a tool version your catalog exposes. Returns 404 when the view does not exist, was deleted, or belongs to another team. #### Path Parameters `view_id` string required Example: `ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7` Output view ID. ##### Request: `/v2/action-gateway/output-views/{view_id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/output-views/ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `view` object optional The output view. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "view": { "audit": { "createdAt": "2026-09-01T16:00:00Z", "deletedAt": null, "updatedAt": "2026-09-01T16:00:00Z" }, "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "kind": "OUTPUT_VIEW_KIND_PROJECTION", "name": "titles-and-urls", "output_schema": { "properties": { "results": { "items": { "properties": { "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "team_id": "123456", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "view_id": "ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an Output View `/v2/action-gateway/output-views/{view_id}` Deletes one of your team's views and returns it with audit.deleted_at set; it can no longer be used. Published views cannot be deleted. Returns 404 when the view does not exist, is already deleted, or is not your team's. #### Path Parameters `view_id` string required Example: `ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7` Output view ID. ##### Request: `/v2/action-gateway/output-views/{view_id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/output-views/ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" ``` #### Responses **200** The output view was deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `view` object optional The output view. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "view": { "audit": { "createdAt": "2026-09-01T16:00:00Z", "deletedAt": "2026-09-10T08:00:00Z", "updatedAt": "2026-09-10T08:00:00Z" }, "description": "Keep only result titles and URLs.", "fields": [ "results.title", "results.url" ], "kind": "OUTPUT_VIEW_KIND_PROJECTION", "name": "titles-and-urls", "output_schema": { "properties": { "results": { "items": { "properties": { "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "team_id": "123456", "tool": "exa_web_search", "tool_id": "tul_exa_web_search", "version": "v1", "view_id": "ov_4f0c2a9d8e1b47c6a3d5f7e9b1c3a5d7" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Endpoints `/v2/action-gateway/endpoints` Lists visible endpoints, newest creation time first, with endpoint UUID descending as the tie-breaker. Keyset pagination remains stable across tied timestamps, deletions, and concurrent inserts. There are no offsets or totals. Team owners may list all endpoints in their team. #### Query Parameters `page_size` integer 1 – 100 optional Example: `20` Page size; defaults to 20 when omitted. Supplied values outside 1 through 100 return 400. Sizes are not clamped. Default: `20` `page_token` string optional Opaque next_page_token from the previous response. Omit for the first page. Malformed tokens or replay with a different team, caller visibility, normalized filters, resource kind, or parent endpoint return 400. Tokens contain no full URNs or database row IDs. `name` string optional Example: `support-agent` Filter by endpoint name. `actor_id` string optional Example: `alice` Filter by the endpoint's actor binding. ##### Request: `/v2/action-gateway/endpoints` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoints?page_size=20" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoints` array of object required Example: `[]` Endpoints ordered by creation time descending, then endpoint UUID descending. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. `next_page_token` string required Opaque keyset cursor for the next page; an empty string marks the last page. Bound to the team, caller visibility, normalized filters, resource kind, and parent endpoint for version lists. Contains no full URNs or database row IDs. Pass it unchanged as page_token with the same criteria. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "endpoints": [ { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-15T14:00:00Z" } ], "next_page_token": "" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Endpoint `/v2/action-gateway/endpoints` Creates a named endpoint and its first immutable version atomically. The MCP URL follows the highest-numbered live version; version_mcp_url stays pinned. The top-level insights field sets the endpoint's Insights consent; version.insights is deprecated and ignored. An invalid name returns 400 invalid_endpoint_name; a duplicate team name returns 409 endpoint_name_taken. #### Request Body: `application/json` `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `name` string required Example: `support-agent` Endpoint name, unique within your team. `version` object required Immutable version configuration. The endpoint owner and actor cannot change between versions. Omitted or empty actor_id means no actor binding. **Show child properties** `actor_id` string optional Example: `alice` Actor whose provider connections are used. Omitted or empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `insights` object optional Deprecated Nullable Deprecated: accepted and ignored. Versions do not carry Insights consent; set the endpoint's insights when creating the endpoint or with PATCH /v2/action-gateway/endpoints/{endpoint_id}. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `network` object optional VPC binding supplied at creation. Omitted when no binding was supplied. region is output-only; requests containing it are rejected. **Show child properties** `vpcUuid` string (uuid) optional Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object optional Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `tools` array of string optional Example: `["exa_web_search@1"]` Omitted enables every tool; an explicit empty array enables no tools. Direct tools use provider-qualified slugs, optionally pinned as tool@version. Toolbelts must be pinned as toolbelt:name@version. Floating pins are rejected. ##### Request: `/v2/action-gateway/endpoints` ### Payload Content type `application/json` ```json { "insights": { "logs": true, "traces": false }, "name": "support-agent", "version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "network": { "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": [ "exa_web_search@1" ] } } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"support-agent","version":{"actor_id":"alice","tools":["exa_web_search@1"],"policy":{"defaultAction":"ask"},"config":{"preloadTools":["exa_web_search"]}}}' \ "https://api.digitalocean.com/v2/action-gateway/endpoints" ``` #### Responses **201** The new head version was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object required A named lineage of immutable versions owned by its creating user. Only that user may use it, update it, create versions, or promote versions. A team owner may also list and delete team endpoints, but may not use them or add versions. Service-managed endpoints and their versions are not part of the public API: lists and search omit them, every read or write of one returns the same 404 as an unknown ID, and deleting one returns the same 204 as deleting an unknown ID without changing it. Deletion is final for this identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing identical contents after endpoint deletion requires a new endpoint identity and a new version identity and number. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. `mcp_url` string (uri) required Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. `version` object required An immutable, live endpoint version. Its ID must encode endpoint_id and version_number. Deleting it does not reuse its number or change older versions. Deletion is final: retries, replays, and later writes cannot resurrect its identity. Identical contents require a new version identity and number. Omitted tools means every tool; a present selection with empty references means no tools. Policy and config retain omission versus explicitly empty objects. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `version_mcp_url` string (uri) required Pinned MCP URL, valid for this version's lifetime. Its final segment is the backing session UUID, not the public composite version ID. VPC-bound versions may use a regional host. Existing /mcp/session/ URLs keep working. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** An endpoint with this name already exists in the team (endpoint_name_taken). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit or your team's endpoint limit was exceeded. A rate-limit error uses too_many_requests. An endpoint-cap error uses endpoint_limit_exceeded; its message includes the limit and current count. The endpoint limit depends on your team's allowance, not a fixed limit for every team. It counts endpoints created through the public API. It does not count each user's default endpoint, which Action Gateway creates on first use, service-managed endpoints, or legacy sessions. Delete an endpoint before creating another when this cap is reached. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-15T14:00:00Z" }, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "version_mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "endpoint_name_taken", "message": "endpoint name is already in use" } ``` **429** Example ```json { "id": "endpoint_limit_exceeded", "message": "endpoint limit 50 reached (current count 50)" } ``` ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Search Endpoints `/v2/action-gateway/endpoints/search` Returns the endpoints you can see whose name, endpoint ID, actor_id, or agent name contains query, case-insensitively. Results are ranked across the whole result set: exact matches first, then prefix matches, then substring matches, then by name. Each endpoint has the list shape, including its embedded head_version. Keyset pagination uses page_size and page_token; a page token is valid only with the same query and actor_id. There are no offsets or totals. Service-managed endpoints are never returned. #### Query Parameters `query` string required Example: `support` Text matched case-insensitively as a substring of the endpoint name, endpoint ID, actor_id, or agent name. Leading and trailing whitespace is trimmed; an empty query returns 400 invalid_search_query. `actor_id` string optional Example: `alice` Exact actor_id filter, combined with query. Omitted or empty means all actors. `page_size` integer 1 – 100 optional Example: `20` Page size; defaults to 20 when omitted. Supplied values outside 1 through 100 return 400. Sizes are not clamped. Default: `20` `page_token` string optional Opaque next_page_token from the previous response. Omit for the first page. Malformed tokens or replay with a different team, caller visibility, normalized filters, resource kind, or parent endpoint return 400. Tokens contain no full URNs or database row IDs. ##### Request: `/v2/action-gateway/endpoints/search` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoints/search?query=support&page_size=20" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoints` array of object required Example: `[]` Matching endpoints in rank order across the whole result set. Do not re-sort a page to rank it. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. `next_page_token` string required Opaque keyset cursor for the next page; an empty string marks the last page. Bound to the team, caller visibility, normalized filters, resource kind, and parent endpoint for version lists. Contains no full URNs or database row IDs. Pass it unchanged as page_token with the same criteria. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "endpoints": [ { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-15T14:00:00Z" } ], "next_page_token": "" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Endpoint `/v2/action-gateway/endpoints/{endpoint_id}` Returns an endpoint with its live head and Insights consent. When no live versions remain, head_version is null and the endpoint MCP URL fails closed until a version is published. An inaccessible endpoint returns 404 endpoint_not_found. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object required A named lineage of immutable versions owned by its creating user. Only that user may use it, update it, create versions, or promote versions. A team owner may also list and delete team endpoints, but may not use them or add versions. Service-managed endpoints and their versions are not part of the public API: lists and search omit them, every read or write of one returns the same 404 as an unknown ID, and deleting one returns the same 204 as deleting an unknown ID without changing it. Deletion is final for this identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing identical contents after endpoint deletion requires a new endpoint identity and a new version identity and number. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-15T14:00:00Z" } } ``` ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-17T09:00:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update an Endpoint `/v2/action-gateway/endpoints/{endpoint_id}` Renames an endpoint, changes its Insights consent, or both, without changing its owner, actor, or versions. Send name, insights, or both. Insights merges per signal: a metrics, logs, or traces value of true or false replaces that signal, and an omitted signal keeps its stored value. The consent applies to every version, including pinned and older versions. A body with no name and no insights signal returns 400 endpoint_update_empty. Only the endpoint owner may update it. An invalid name returns 400 invalid_endpoint_name; a duplicate team name returns 409 endpoint_name_taken. Inaccessible endpoints return 404 endpoint_not_found. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. #### Request Body: `application/json` `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `name` string optional Example: `support-agent` Endpoint name, unique within your team. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}` ### Payload Content type `application/json` Example ```json { "insights": { "logs": false } } ``` ```json { "name": "support-agent" } ``` ```json { "insights": { "traces": true } } ``` ### cURL ```bash curl -X PATCH \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"support-agent"}' \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object required A named lineage of immutable versions owned by its creating user. Only that user may use it, update it, create versions, or promote versions. A team owner may also list and delete team endpoints, but may not use them or add versions. Service-managed endpoints and their versions are not part of the public API: lists and search omit them, every read or write of one returns the same 404 as an unknown ID, and deleting one returns the same 204 as deleting an unknown ID without changing it. Deletion is final for this identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing identical contents after endpoint deletion requires a new endpoint identity and a new version identity and number. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** An endpoint with this name already exists in the team (endpoint_name_taken). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-15T14:00:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "endpoint_name_taken", "message": "endpoint name is already in use" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an Endpoint `/v2/action-gateway/endpoints/{endpoint_id}` Deletes an endpoint and all its versions. The owner or a team owner may delete it. Missing endpoints, endpoints outside your team, and otherwise invisible endpoints all return the same empty 204 response as a successful deletion. A service-managed endpoint is invisible: deleting its ID returns the same 204 as an unknown ID and does not change it. Repeating a delete returns 204. Deletion is final for the endpoint identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing the same contents requires a new endpoint identity and a new version identity and number. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13" ``` #### Responses **204** The endpoint was deleted or no visible endpoint matched. The response is empty in either case. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Endpoint Versions `/v2/action-gateway/endpoints/{endpoint_id}/versions` Lists live versions of an accessible endpoint by version_number descending, using keyset pagination without offsets or totals. The cursor is bound to this parent endpoint as well as the caller and team. Inaccessible endpoints return 404 endpoint_not_found. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. #### Query Parameters `page_size` integer 1 – 100 optional Example: `20` Page size; defaults to 20 when omitted. Supplied values outside 1 through 100 return 400. Sizes are not clamped. Default: `20` `page_token` string optional Opaque next_page_token from the previous response. Omit for the first page. Malformed tokens or replay with a different team, caller visibility, normalized filters, resource kind, or parent endpoint return 400. Tokens contain no full URNs or database row IDs. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}/versions` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/versions?page_size=20" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string required Opaque keyset cursor for the next page; an empty string marks the last page. Bound to the team, caller visibility, normalized filters, resource kind, and parent endpoint for version lists. Contains no full URNs or database row IDs. Pass it unchanged as page_token with the same criteria. `versions` array of object required Example: `[]` Live versions ordered by version_number descending. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "versions": [ { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Endpoint Version `/v2/action-gateway/endpoints/{endpoint_id}/versions` Publishes a new immutable version as the endpoint's head. Only the endpoint owner may create versions, and the actor binding must match the endpoint. An identity mismatch returns 404 endpoint_identity_mismatch. Inaccessible endpoints return 404 endpoint_not_found. Publishing identical contents still creates a new version identity and number; it never resurrects a deleted version. Versions carry no Insights consent: a request's insights field is deprecated and ignored, and the endpoint's consent applies to the new version. Neither new-version creation nor head replacement changes that consent; change it with PATCH /v2/action-gateway/endpoints/{endpoint_id}. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. #### Request Body: `application/json` `actor_id` string optional Example: `alice` Actor whose provider connections are used. Omitted or empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `insights` object optional Deprecated Nullable Deprecated: accepted and ignored. Versions do not carry Insights consent; set the endpoint's insights when creating the endpoint or with PATCH /v2/action-gateway/endpoints/{endpoint_id}. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `network` object optional VPC binding supplied at creation. Omitted when no binding was supplied. region is output-only; requests containing it are rejected. **Show child properties** `vpcUuid` string (uuid) optional Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object optional Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `tools` array of string optional Example: `["exa_web_search@1"]` Omitted enables every tool; an explicit empty array enables no tools. Direct tools use provider-qualified slugs, optionally pinned as tool@version. Toolbelts must be pinned as toolbelt:name@version. Floating pins are rejected. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}/versions` ### Payload Content type `application/json` ```json { "actor_id": "alice", "config": {}, "policy": {}, "tools": [] } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"actor_id":"alice","tools":[],"policy":{},"config":{}}' \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/versions" ``` #### Responses **201** The new head version was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object required A named lineage of immutable versions owned by its creating user. Only that user may use it, update it, create versions, or promote versions. A team owner may also list and delete team endpoints, but may not use them or add versions. Service-managed endpoints and their versions are not part of the public API: lists and search omit them, every read or write of one returns the same 404 as an unknown ID, and deleting one returns the same 204 as deleting an unknown ID without changing it. Deletion is final for this identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing identical contents after endpoint deletion requires a new endpoint identity and a new version identity and number. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. `mcp_url` string (uri) required Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. `version` object required An immutable, live endpoint version. Its ID must encode endpoint_id and version_number. Deleting it does not reuse its number or change older versions. Deletion is final: retries, replays, and later writes cannot resurrect its identity. Identical contents require a new version identity and number. Omitted tools means every tool; a present selection with empty references means no tools. Policy and config retain omission versus explicitly empty objects. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `version_mcp_url` string (uri) required Pinned MCP URL, valid for this version's lifetime. Its final segment is the backing session UUID, not the public composite version ID. VPC-bound versions may use a regional host. Existing /mcp/session/ URLs keep working. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** An inaccessible endpoint returns endpoint_not_found. A request whose owner or actor differs from the endpoint returns endpoint_identity_mismatch. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit or the endpoint's live-version limit was exceeded. A rate-limit error uses too_many_requests. A version-cap error uses endpoint_version_limit_exceeded. Each endpoint may have at most 100 live versions. Creation and promotion both consume a live-version slot. Delete an older live version before creating or promoting another when this cap is reached. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": {}, "created_at": "2026-10-16T13:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v2", "mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "name": "support-agent", "policy": { "defaultAction": "SESSION_POLICY_ACTION_UNSPECIFIED", "rules": [] }, "tools": { "references": [] }, "updated_at": "2026-10-16T13:00:00Z", "version_number": 2 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-16T13:00:00Z" }, "mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "version": { "actor_id": "alice", "config": {}, "created_at": "2026-10-16T13:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v2", "mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "name": "support-agent", "policy": { "defaultAction": "SESSION_POLICY_ACTION_UNSPECIFIED", "rules": [] }, "tools": { "references": [] }, "updated_at": "2026-10-16T13:00:00Z", "version_number": 2 }, "version_mcp_url": "https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** Example ```json { "id": "endpoint_identity_mismatch", "message": "version owner and actor must match the endpoint" } ``` ```json { "id": "endpoint_not_found", "message": "endpoint not found" } ``` **429** Example ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` ```json { "id": "endpoint_version_limit_exceeded", "message": "live version limit reached; delete an older version" } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Promote an Endpoint Version `/v2/action-gateway/endpoints/{endpoint_id}/versions:promote` Copies a live version's configuration into a new, higher-numbered head version and sets promoted_from_version_number. Existing versions never change. Only the endpoint owner may promote. An inaccessible endpoint returns 404 endpoint_not_found, and a deleted, unknown, or different endpoint's version returns 404 endpoint_version_not_found. The new version always has a new identity and number, even for identical contents; deleted identities are never resurrected. Head replacement does not change the endpoint's Insights consent, which applies to every version. #### Path Parameters `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Endpoint UUID only. Malformed IDs or full URNs return 400 invalid_endpoint_id. #### Request Body: `application/json` `version_id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. ##### Request: `/v2/action-gateway/endpoints/{endpoint_id}/versions:promote` ### Payload Content type `application/json` ```json { "version_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1" } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{"version_id":"1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1"}' \ "https://api.digitalocean.com/v2/action-gateway/endpoints/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/versions:promote" ``` #### Responses **201** The new head version was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object required A named lineage of immutable versions owned by its creating user. Only that user may use it, update it, create versions, or promote versions. A team owner may also list and delete team endpoints, but may not use them or add versions. Service-managed endpoints and their versions are not part of the public API: lists and search omit them, every read or write of one returns the same 404 as an unknown ID, and deleting one returns the same 204 as deleting an unknown ID without changing it. Deletion is final for this identity and all cascaded version identities; retries, replays, and later writes cannot resurrect them. Reusing identical contents after endpoint deletion requires a new endpoint identity and a new version identity and number. **Show child properties** `actor_id` string required Example: `alice` Immutable actor binding; empty means no actor. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was created. `head_version` object optional Nullable Embedded live head version, the highest-numbered live version. Null when no live version remains. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `insights` object optional Nullable The endpoint's Insights consent. It applies to every version of the endpoint, including pinned and older versions. For each signal independently, the latest explicit true enables and false disables. Omission preserves the existing value through updates, head replacement, and new-version creation; none of these operations implicitly resets a choice, and a stored choice cannot be cleared. Metrics defaults are unchanged. **Show child properties** `logs` boolean optional Nullable Example: `true` Explicit true enables customer logs and false disables them. Omission preserves the existing choice without an implicit reset. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Explicit true enables customer traces and false disables them. Omission preserves the existing choice without an implicit reset. `is_default` boolean optional read-only Example: `false` True only for your own default endpoint in the team: the one the generic MCP URL and data-plane requests without `X-Session-Id` or `X-Endpoint-Id` resolve to for you, which Action Gateway creates on first use. False for every other endpoint, including other team members' default endpoints that a team owner can see, so a response marks at most one endpoint. A default endpoint does not count toward your team's endpoint limit or reserve its name. After it is deleted, the next such request creates a new default. Returned in responses only. `mcp_url` string (uri) optional read-only Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. It is the same value the create response returns as mcp_url. Returned in responses only. `name` string required Example: `support-agent` Endpoint name, unique within your team. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the endpoint was last changed. `mcp_url` string (uri) required Example: `https://actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` MCP URL that resolves the highest-numbered live version on every request. Its host follows the head version's VPC region, or the default host when no version is live. `version` object required An immutable, live endpoint version. Its ID must encode endpoint_id and version_number. Deleting it does not reuse its number or change older versions. Deletion is final: retries, replays, and later writes cannot resurrect its identity. Identical contents require a new version identity and number. Omitted tools means every tool; a present selection with empty references means no tools. Policy and config retain omission versus explicitly empty objects. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `version_mcp_url` string (uri) required Pinned MCP URL, valid for this version's lifetime. Its final segment is the backing session UUID, not the public composite version ID. VPC-bound versions may use a regional host. Existing /mcp/session/ URLs keep working. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** An inaccessible endpoint returns endpoint_not_found. A version that is deleted, unknown, or belongs to another endpoint returns endpoint_version_not_found. A source version whose owner or actor differs from the endpoint returns endpoint_identity_mismatch. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit or the endpoint's live-version limit was exceeded. A rate-limit error uses too_many_requests. A version-cap error uses endpoint_version_limit_exceeded. Each endpoint may have at most 100 live versions. Creation and promotion both consume a live-version slot. Delete an older live version before creating or promoting another when this cap is reached. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "endpoint": { "actor_id": "alice", "created_at": "2026-10-15T14:00:00Z", "head_version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-16T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v3", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/3b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "promoted_from_version_number": 1, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-16T14:00:00Z", "version_number": 3 }, "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "insights": { "logs": true, "metrics": null, "traces": false }, "is_default": false, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "name": "support-agent", "updated_at": "2026-10-16T14:00:00Z" }, "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-16T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v3", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/3b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "promoted_from_version_number": 1, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-16T14:00:00Z", "version_number": 3 }, "version_mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/3b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** Example ```json { "id": "endpoint_identity_mismatch", "message": "version owner and actor must match the endpoint" } ``` ```json { "id": "endpoint_not_found", "message": "endpoint not found" } ``` ```json { "id": "endpoint_version_not_found", "message": "endpoint version not found" } ``` **429** Example ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` ```json { "id": "endpoint_version_limit_exceeded", "message": "live version limit reached; delete an older version" } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Endpoint Version `/v2/action-gateway/endpoint-versions/{version_id}` Returns the exact live version named by its composite public ID. An inaccessible or deleted version returns 404 endpoint_version_not_found. A bare session UUID is not a version ID. #### Path Parameters `version_id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` Composite version ID only. Invalid IDs return 400 invalid_endpoint_version_id. ##### Request: `/v2/action-gateway/endpoint-versions/{version_id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoint-versions/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `version` object required An immutable, live endpoint version. Its ID must encode endpoint_id and version_number. Deleting it does not reuse its number or change older versions. Deletion is final: retries, replays, and later writes cannot resurrect its identity. Identical contents require a new version identity and number. Omitted tools means every tool; a present selection with empty references means no tools. Policy and config retain omission versus explicitly empty objects. **Show child properties** `actor_id` string required Example: `alice` Actor binding shared by every version of the endpoint; empty means no actor. `config` object optional Version options, stored and returned as supplied. Omission leaves config absent; an explicit empty object is preserved. Property names are camelCase, as in the session API; other keys are stored but have no effect. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `customInstructions` string optional Example: `Prefer primary sources and cite URLs.` Instructions for tools in this version. `outputViews` object optional Example: `{"exa_web_search":"titles-and-urls"}` Maps up to 100 tool slugs to output-view names. `preloadTools` array of string optional Example: `["exa_web_search"]` Tool names, optionally version-pinned, or version-pinned toolbelt references. `(additional properties)` object optional Additional properties are allowed. `created_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was created. `endpoint_id` string (uuid) required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Lowercase, hyphenated endpoint UUID, without a URN prefix. `id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` The endpoint UUID followed by .v and its version number, without a URN prefix. The UUID is lowercase and hyphenated. The number is from 1 through 4294967295, in decimal without signs or leading zeros. A bare UUID is not a version ID. `insights` object optional Deprecated Deprecated: always omitted. Versions do not carry Insights consent; read the endpoint's insights instead. **Show child properties** `logs` boolean optional Nullable Example: `true` Whether the session's customer logs are sent to Insights. `metrics` boolean optional Nullable Example: `true` Accepted and stored for parity with the Insights schema. `traces` boolean optional Nullable Example: `false` Whether the session's customer traces are sent to Insights. `mcp_url` string (uri) optional read-only Pinned MCP URL for this version, valid for the version's lifetime. It is the same value the create response returns as version_mcp_url. Its final segment is the backing session UUID, not the composite version ID. VPC-bound versions may use a regional host. Returned in responses only. `name` string required Example: `support-agent` The endpoint's name when this version was created. Renaming the endpoint does not change it. `network` object optional VPC binding, including the VPC region recorded at creation. Omitted when no binding was supplied. **Show child properties** `region` string required read-only Example: `nyc3` The VPC's region, recorded when the version was created. A tool call through a connection whose VPC is in a different region is refused. This field is returned in responses only and is rejected in requests. `vpcUuid` string (uuid) required Example: `5a4981aa-9653-4bd1-bef5-d6bff52042e4` UUID of a VPC owned by your team in a supported region. `policy` object required Nullable Tool-permission policy. Omission or an empty object asks before every call. Property names are camelCase, as in the session API. **Show child properties** `defaultAction` string, one of: allow, ask, deny, SESSION_POLICY_ACTION_UNSPECIFIED optional Example: `ask` Action for calls no rule matches. Omission means ask; responses then return SESSION_POLICY_ACTION_UNSPECIFIED. `rules` array of object optional Example: `[]` Rules for selected tools or toolbelts. **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` Action when the rule matches. `match` object optional Example: `{}` Argument conditions; an empty object matches every call to the tool. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `exa_web_search` Selected tool slug or version-pinned toolbelt reference. `promoted_from_version_number` integer (int64) optional Example: `1` Positive unsigned 32-bit version number, never reused after deletion. `tools` object optional Canonical pinned selection; omitted means every tool, empty references means none. `updated_at` string (date-time) required Example: `2026-10-15T14:00:00Z` When the version was last updated. `version_number` integer (int64) required Example: `1` Positive unsigned 32-bit version number, never reused after deletion. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "version": { "actor_id": "alice", "config": { "customInstructions": "Prefer primary sources and cite URLs.", "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "created_at": "2026-10-15T14:00:00Z", "endpoint_id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13", "id": "1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1", "mcp_url": "https://nyc3.actions.do-ai.run/mcp/endpoint/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13/version/9a7c2d5b-6e8f-4a13-8f3c-2a6e1b4d4e0f", "name": "support-agent", "network": { "region": "nyc3", "vpcUuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" }, "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "exa_web_search@1" } ] }, "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "exa_web_search", "version": "1" } ] }, "updated_at": "2026-10-15T14:00:00Z", "version_number": 1 } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an Endpoint Version `/v2/action-gateway/endpoint-versions/{version_id}` Deletes a live version. Only the endpoint owner may delete versions. Deleting the head makes the highest-numbered remaining live version the head. With no live versions, the endpoint MCP URL fails closed until another version is published. Inaccessible or deleted versions return 404 endpoint_version_not_found, and so does a version of a service-managed endpoint, exactly as for an unknown ID. Deletion is final for the version identity. Retries, replays, and later writes cannot resurrect it. Reusing identical contents requires a new version identity and version number. #### Path Parameters `version_id` string required Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` Composite version ID only. Invalid IDs return 400 invalid_endpoint_version_id. ##### Request: `/v2/action-gateway/endpoint-versions/{version_id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/endpoint-versions/1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1" ``` #### Responses **204** The resource was deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Sessions Deprecated `/v2/action-gateway/sessions` Deprecated: use GET /v2/action-gateway/endpoints for endpoints. This route continues to list legacy sessions with its existing fields and pagination. Returns the sessions you can see, newest first. Offset-paged with page and `per_page`; `end_user_id` filters to one actor. #### Query Parameters `end_user_id` string optional Example: `alice` Optional `actor_id`, matched exactly. `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/sessions` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/sessions" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of sessions. `sessions` array of object optional Sessions, newest first. **Show child properties** `actorId` string optional Example: `alice` Empty when the session is not bound to an actor. `agentName` string optional Name of the agent that started the session. Empty for sessions created through this API. `agentUrn` string optional URN of the agent that started the session. Empty for sessions created through this API. `config` object optional Example: `{"outputViews":{"exa_web_search":"titles-and-urls"},"preloadTools":["exa_web_search"]}` Session options as supplied at creation. Omitted when none were supplied. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `(additional properties)` object optional Additional properties are allowed. `createdAt` string (date-time) optional Nullable Example: `2026-09-24T12:00:00Z` When the session was created. `endpoint_id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Public parent endpoint UUID. Absent for legacy sessions without a parent. `endpoint_version_id` string optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` Public composite version ID. Absent for legacy sessions without a parent. `insights` object optional Omitted when no explicit customer Insights choice was stored. `name` string optional Example: `support-bot-alice` The required human-readable session name. `network` object optional Omitted when the request omitted network. A present binding currently supports only VPC attachment by UUID. `owning_user_id` string optional Example: `2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c` DigitalOcean user ID of the user who created the session, when recorded. `policy` object optional The session's tool-permission policy. `sessionUrn` string optional Example: `do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` Session URN, for example `do:managed_agent_session:`. `tools` object optional Omitted when the request omitted tools (all tools). A present selection with no references represents tools: \[]. **Show child properties** `references` array of object optional The selected references. Empty means the session exposes no tools. **Show child properties** `kind` string, one of: SESSION_TOOL_REFERENCE_KIND_TOOL, SESSION_TOOL_REFERENCE_KIND_TOOLBELT optional Example: `SESSION_TOOL_REFERENCE_KIND_TOOLBELT` Whether name is a tool or a toolbelt. `name` string optional Example: `search-toolbelt` Tool slug or toolbelt name. `version` string optional Example: `1` Pinned version. `updatedAt` string (date-time) optional Nullable Example: `2026-09-24T12:00:00Z` When the session was last modified. `version_number` integer (int64) optional Example: `1` Version number within the parent endpoint. Absent for legacy sessions without a parent. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 1 }, "sessions": [ { "actorId": "alice", "agentName": "", "agentUrn": "", "config": { "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "createdAt": "2026-09-24T12:00:00Z", "name": "support-bot-alice", "owning_user_id": "2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c", "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "toolbelt:search-toolbelt@1" }, { "action": "ask", "match": {}, "tool": "jira_create_issue" } ] }, "sessionUrn": "do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOLBELT", "name": "search-toolbelt", "version": "1" }, { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "jira_create_issue", "version": "1" } ] }, "updatedAt": "2026-09-24T12:00:00Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Session Deprecated `/v2/action-gateway/sessions` Deprecated: use POST /v2/action-gateway/endpoints. Existing sessions and their MCP URLs keep working. A new session may be created as version 1 of a new endpoint whose name is derived from the session name, with part of the session ID appended when that name is taken. The response then includes endpoint_id, endpoint_version_id, and version_number. Such a session counts against your team's endpoint limit (429 endpoint_limit_exceeded). If every derived name is already used by an endpoint in your team, the request returns 409 endpoint_name_taken. Creates a session owned by your team, with a new session URN, and returns the MCP URL an agent connects to. tools selects the tools and toolbelts the session exposes, and policy decides which calls run, need approval, or are refused. Set config.cache to opt into result caching for all eligible tools or a specific list. Caching is off by default and must be enabled for the team. #### Request Body: `application/json` `actorId` string optional Example: `alice` Optional actor binding: the user whose connections the session's tool calls use, matched against connection `user_id`. When set it must use the same alphabet as a connection's `user_id`, `[A-Za-z0-9._-]`, at most 64 characters; anything else is rejected with 400. `config` object optional Optional session options. config.preloadTools may contain concrete tool names (optionally version-pinned) and version-pinned toolbelt references. config.customInstructions is a string of at most 1000 characters. config.outputViews maps up to 100 tool slugs to the name of an output view to apply to that tool's results. config.cache opts eligible tools into result caching for this session. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `(additional properties)` object optional Additional properties are allowed. `insights` object optional Omitted when the request omitted insights or explicitly sent null. `name` string required Example: `support-bot-alice` Required human-readable session name. `network` object optional Product-level session network binding. When set, `vpc_uuid` must identify a VPC owned by the session's team. `policy` object optional Optional tool-permission policy. Omitted asks before every call. `tools` array of string optional Example: `["toolbelt:search-toolbelt@1","jira_create_issue"]` Omitted enables every tool. An explicit empty array enables no tools. Direct tools may be `` or `@`, using provider-qualified tool slugs, and a pinned version must be the released one; toolbelt references must be version-pinned as `toolbelt:@`. ##### Request: `/v2/action-gateway/sessions` ### Payload Content type `application/json` ```json { "actorId": "alice", "config": { "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "name": "support-bot-alice", "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "toolbelt:search-toolbelt@1" }, { "action": "ask", "match": {}, "tool": "jira_create_issue" } ] }, "tools": [ "toolbelt:search-toolbelt@1", "jira_create_issue" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"support-bot-alice","actorId":"alice","tools":["toolbelt:search-toolbelt@1","jira_create_issue"],"policy":{"defaultAction":"ask","rules":[{"tool":"toolbelt:search-toolbelt@1","match":{},"action":"allow"},{"tool":"jira_create_issue","match":{},"action":"ask"}]},"config":{"preloadTools":["exa_web_search"],"outputViews":{"exa_web_search":"titles-and-urls"}}}' \ "https://api.digitalocean.com/v2/action-gateway/sessions" ``` #### Responses **200** The session was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `mcpUrl` string optional Example: `https://actions.do-ai.run/mcp/session/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` URL of the session's MCP endpoint, for the agent to connect to. `session` object optional The created session. `tools` array of string optional Example: `["toolbelt:search-toolbelt@1","jira_create_issue@1"]` Canonical, version-pinned selected tool references. Empty when the session exposes every tool. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The session is created as an endpoint, and every endpoint name derived from the session name is already in use in the team (endpoint_name_taken). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit or your team's endpoint limit was exceeded. A rate-limit error uses too_many_requests. When the new session is created as an endpoint, it counts against your team's endpoint limit, and a full limit returns endpoint_limit_exceeded with the limit and current count in its message. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "mcpUrl": "https://actions.do-ai.run/mcp/session/2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "session": { "actorId": "alice", "agentName": "", "agentUrn": "", "config": { "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "createdAt": "2026-09-24T12:00:00Z", "name": "support-bot-alice", "owning_user_id": "2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c", "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "toolbelt:search-toolbelt@1" }, { "action": "ask", "match": {}, "tool": "jira_create_issue" } ] }, "sessionUrn": "do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOLBELT", "name": "search-toolbelt", "version": "1" }, { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "jira_create_issue", "version": "1" } ] }, "updatedAt": "2026-09-24T12:00:00Z" }, "tools": [ "toolbelt:search-toolbelt@1", "jira_create_issue@1" ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "endpoint_name_taken", "message": "endpoint name is already in use; choose another session name" } ``` **429** Example ```json { "id": "endpoint_limit_exceeded", "message": "endpoint limit 50 reached (current count 50)" } ``` ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Search Sessions Deprecated `/v2/action-gateway/sessions/search` Deprecated: use GET /v2/action-gateway/endpoints/search for endpoints. This route continues to search legacy sessions with its existing fields and pagination. Returns the sessions you can see whose name, `actor_id`, `session_urn`, or `agentName` contains query, case-insensitively, ranked across the whole result set. Cursor-paged with `page_size` and `page_token`; no total is reported. #### Query Parameters `query` string optional Example: `search` Matched case-insensitively as a substring of name, `actor_id`, `session_urn`, or `agentName`. Empty matches every session you can see. Results are ordered by match quality (an exact name, `session_urn`, or `actor_id` match, then a prefix, then a substring), then by name, across the whole result set, so a client must not re-sort a page to rank it. `end_user_id` string optional Example: `alice` `end_user_id`, when set, is an exact filter on `actor_id` (the same filter as on the session list) and combines with query as AND. `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response. Valid only with the same query and `end_user_id`; otherwise the request is rejected with 400. ##### Request: `/v2/action-gateway/sessions/search` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/sessions/search?query=support" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Token for the next page; empty on the last page. `sessions` array of object optional Matching sessions in rank order. **Show child properties** `actorId` string optional Example: `alice` Empty when the session is not bound to an actor. `agentName` string optional Name of the agent that started the session. Empty for sessions created through this API. `agentUrn` string optional URN of the agent that started the session. Empty for sessions created through this API. `config` object optional Example: `{"outputViews":{"exa_web_search":"titles-and-urls"},"preloadTools":["exa_web_search"]}` Session options as supplied at creation. Omitted when none were supplied. **Show child properties** `cache` string optional Example: `{"allEligible":true,"maxAgeSeconds":60}` Opts the session into result caching. Omit config.cache to leave caching off. Set exactly one of tools or allEligible. Caching must also be enabled for the team. Tool selection and permission rules still apply to every call. `(additional properties)` object optional Additional properties are allowed. `createdAt` string (date-time) optional Nullable Example: `2026-09-24T12:00:00Z` When the session was created. `endpoint_id` string (uuid) optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13` Public parent endpoint UUID. Absent for legacy sessions without a parent. `endpoint_version_id` string optional Example: `1b4d4e0f-9a7c-4d5b-8f3c-2a6e6e8f0a13.v1` Public composite version ID. Absent for legacy sessions without a parent. `insights` object optional Omitted when no explicit customer Insights choice was stored. `name` string optional Example: `support-bot-alice` The required human-readable session name. `network` object optional Omitted when the request omitted network. A present binding currently supports only VPC attachment by UUID. `owning_user_id` string optional Example: `2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c` DigitalOcean user ID of the user who created the session, when recorded. `policy` object optional The session's tool-permission policy. `sessionUrn` string optional Example: `do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` Session URN, for example `do:managed_agent_session:`. `tools` object optional Omitted when the request omitted tools (all tools). A present selection with no references represents tools: \[]. **Show child properties** `references` array of object optional The selected references. Empty means the session exposes no tools. **Show child properties** `kind` string, one of: SESSION_TOOL_REFERENCE_KIND_TOOL, SESSION_TOOL_REFERENCE_KIND_TOOLBELT optional Example: `SESSION_TOOL_REFERENCE_KIND_TOOLBELT` Whether name is a tool or a toolbelt. `name` string optional Example: `search-toolbelt` Tool slug or toolbelt name. `version` string optional Example: `1` Pinned version. `updatedAt` string (date-time) optional Nullable Example: `2026-09-24T12:00:00Z` When the session was last modified. `version_number` integer (int64) optional Example: `1` Version number within the parent endpoint. Absent for legacy sessions without a parent. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "sessions": [ { "actorId": "alice", "agentName": "", "agentUrn": "", "config": { "outputViews": { "exa_web_search": "titles-and-urls" }, "preloadTools": [ "exa_web_search" ] }, "createdAt": "2026-09-24T12:00:00Z", "name": "support-bot-alice", "owning_user_id": "2f8e1c3a-6b4d-4f7e-9a1c-5d3b7e9f1a2c", "policy": { "defaultAction": "ask", "rules": [ { "action": "allow", "match": {}, "tool": "toolbelt:search-toolbelt@1" }, { "action": "ask", "match": {}, "tool": "jira_create_issue" } ] }, "sessionUrn": "do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "tools": { "references": [ { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOLBELT", "name": "search-toolbelt", "version": "1" }, { "kind": "SESSION_TOOL_REFERENCE_KIND_TOOL", "name": "jira_create_issue", "version": "1" } ] }, "updatedAt": "2026-09-24T12:00:00Z" } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Session Deprecated `/v2/action-gateway/sessions/{session_urn}` Deprecated: use DELETE /v2/action-gateway/endpoints/{endpoint_id} for endpoints. This route continues to accept legacy session URNs and delete legacy sessions. Deletes the session and its policy. Succeeds without deleting anything when the session does not exist or you cannot delete it, so repeating a delete also succeeds. A malformed `session_urn` is rejected with 400. When the session is a version of an endpoint, this deletes that version, and deleting the endpoint's last live version also deletes the endpoint. Deleting the last live version with DELETE /v2/action-gateway/endpoint-versions/{version_id} instead keeps the endpoint, with no live version. #### Path Parameters `session_urn` string required Example: `do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b` URN of the session, for example `do:managed_agent_session:`. ##### Request: `/v2/action-gateway/sessions/{session_urn}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/sessions/do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b" ``` #### Responses **200** The session was deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json {} ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Toolbelts `/v2/action-gateway/toolbelts` Returns your team's toolbelts, one entry per name describing its latest version, sorted by name. Offset-paged with page and `per_page`; pagination reports the total. #### Query Parameters `status` string, one of: active, deprecated, all optional Example: `active` active (default), deprecated, or all. Case-insensitive. Default: `active` `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/toolbelts` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of toolbelts. `toolbelts` array of object optional Toolbelts sorted by name. **Show child properties** `description` string optional Example: `Tools for searching and fetching public web pages.` Description of the latest version. `display_name` string optional Example: `Search Tools` Human-readable label of the latest version. `latest_version` string optional Example: `1` Latest version number, as a string. `name` string optional Example: `search-toolbelt` Toolbelt name. `reference_latest` string optional Example: `search-toolbelt` The toolbelt name, which refers to whichever version is latest. `status` string, one of: active, deprecated optional Example: `active` active, or deprecated once the toolbelt is deleted. `tool_count` integer (int32) optional Example: `2` Number of members in the latest version. `updated_at` string (date-time) optional Example: `2026-06-11T12:00:00Z` When the latest version was last modified, in RFC 3339 format. `version_count` integer (int32) optional Example: `1` Number of versions recorded under this name, including versions from before the toolbelt was deleted and the name reused. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 1 }, "toolbelts": [ { "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "latest_version": "1", "name": "search-toolbelt", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 2, "updated_at": "2026-06-11T12:00:00Z", "version_count": 1 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Toolbelt `/v2/action-gateway/toolbelts` A toolbelt is a named set of tools, each pinned to a version, that your team can attach to sessions as `toolbelt:@`. The first version is 1 unless version is set. Returns 409 if an active toolbelt with the same name exists. The name of a deleted toolbelt can be reused; its versions start again from the initial version. #### Request Body: `application/json` `description` string optional Example: `Tools for searching and fetching public web pages.` Optional description. At most 255 bytes. `display_name` string optional Example: `Search Tools` Optional human-readable label, separate from name. At most 128 bytes. `name` string required Example: `search-toolbelt` Toolbelt name, unique among your team's active toolbelts. Must match `^`\[a-z]\`\`\[a-z0-9_-]`{0,63}$`; `search` is reserved. `tools` array of string optional Example: `["exa_web_search","exa_web_fetch"]` Optional initial members, as catalog tool slugs (`_`). Each may be pinned as `@`; a pin must equal the tool's current released version, and an unpinned tool is pinned to that version. Every tool must be an active catalog tool. Duplicates are merged; at most 500 tools. Empty creates a toolbelt with no tools. `version` string optional Example: `1` Optional initial version number, a positive integer such as `1`. Defaults to 1. ##### Request: `/v2/action-gateway/toolbelts` ### Payload Content type `application/json` ```json { "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "tools": [ "exa_web_search", "exa_web_fetch" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"search-toolbelt","display_name":"Search Tools","description":"Tools for searching and fetching public web pages.","tools":["exa_web_search","exa_web_fetch"]}' \ "https://api.digitalocean.com/v2/action-gateway/toolbelts" ``` #### Responses **200** The toolbelt was created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `toolbelt` object optional The first version of the new toolbelt. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@1", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 2, "tools": [ "exa_web_fetch@1", "exa_web_search@1" ], "updated_at": "2026-06-11T12:00:00Z", "version": "1" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Search Toolbelts `/v2/action-gateway/toolbelts/search` Returns your team's toolbelts whose name, display name, or description contains query, case-insensitively, sorted by name. Cursor-paged with `page_size` and `page_token`; no total is reported. #### Query Parameters `query` string optional Example: `search` Matched case-insensitively as a substring of name, `display_name`, or description. Empty matches every toolbelt of your team. `status` string, one of: active, deprecated, all optional Example: `active` active (default), deprecated, or all. Case-insensitive. Default: `active` `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response. Valid only with the same query and status; otherwise the request is rejected with 400. ##### Request: `/v2/action-gateway/toolbelts/search` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search?query=search" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Token for the next page; empty on the last page. `toolbelts` array of object optional Matching toolbelts sorted by name. **Show child properties** `description` string optional Example: `Tools for searching and fetching public web pages.` Description of the latest version. `display_name` string optional Example: `Search Tools` Human-readable label of the latest version. `latest_version` string optional Example: `1` Latest version number, as a string. `name` string optional Example: `search-toolbelt` Toolbelt name. `reference_latest` string optional Example: `search-toolbelt` The toolbelt name, which refers to whichever version is latest. `status` string, one of: active, deprecated optional Example: `active` active, or deprecated once the toolbelt is deleted. `tool_count` integer (int32) optional Example: `2` Number of members in the latest version. `updated_at` string (date-time) optional Example: `2026-06-11T12:00:00Z` When the latest version was last modified, in RFC 3339 format. `version_count` integer (int32) optional Example: `1` Number of versions recorded under this name, including versions from before the toolbelt was deleted and the name reused. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "toolbelts": [ { "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "latest_version": "1", "name": "search-toolbelt", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 2, "updated_at": "2026-06-11T12:00:00Z", "version_count": 1 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Toolbelt `/v2/action-gateway/toolbelts/{name}` Returns the latest version of the named toolbelt, or the version requested, with catalog metadata for one page of its members in `tool_details`. A deleted toolbelt returns 404 unless a version is requested. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name. #### Query Parameters `version` string optional Example: `1` Version number to read. Empty returns the latest version. `page_size` integer 1 – 100 optional Example: `20` Page size for `tool_details` only; toolbelt.tools always lists every member. Defaults to 20; values above 100 are capped at 100. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response, to continue `tool_details`. Treat it as opaque, and send it only with the same toolbelt, version, and search. `search` string optional Example: `search` Restricts `tool_details` to members whose tool slug, name, title, description, provider, or category contains this value, case-insensitively. It does not filter toolbelt.tools. This is a substring match, not a filter expression. ##### Request: `/v2/action-gateway/toolbelts/{name}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Token for the next page of `tool_details`; empty on the last page. `tool_details` array of object optional The requested page of resolved catalog metadata for the members named in toolbelt.tools. It is a page, so it is not the membership of the toolbelt: read toolbelt.tools for that, and toolbelt.tool_count for the total. Ordering matches toolbelt.tools. **Show child properties** `category` string optional Example: `web-search` Best-effort catalog metadata and is empty for a large share of the catalog. Do not rely on it being present. `description` string optional Example: `Search the public web with Exa and return relevant results with normalized text snippets.` What the tool does. `name` string optional Example: `web_search` The unqualified tool name, without the provider prefix. `provider` string optional Example: `exa` The ID of the provider that offers the tool, broken out so a client never has to split `tool_slug`. `title` string optional Example: `Web Search` Human-readable tool title. `tool_slug` string optional Example: `exa_web_search` The provider-qualified, stable tool identifier (`_`). Treat it as opaque and pass it back verbatim. `version` integer (int32) optional Example: `1` The version this toolbelt version pins for the member, matching the `@` suffix in the corresponding toolbelt.tools entry. `toolbelt` object optional The requested toolbelt version. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "tool_details": [ { "category": "web-fetch", "description": "Fetch the contents of a public web page with Exa.", "name": "web_fetch", "provider": "exa", "title": "Web Fetch", "tool_slug": "exa_web_fetch", "version": 1 }, { "category": "web-search", "description": "Search the public web with Exa and return relevant results with normalized text snippets.", "name": "web_search", "provider": "exa", "title": "Web Search", "tool_slug": "exa_web_search", "version": 1 } ], "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@1", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 2, "tools": [ "exa_web_fetch@1", "exa_web_search@1" ], "updated_at": "2026-06-11T12:00:00Z", "version": "1" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Toolbelt `/v2/action-gateway/toolbelts/{name}` Marks the toolbelt deleted and returns its latest version with status deprecated. Its versions stay readable by explicit version until the name is reused. The name is free to reuse immediately; a new toolbelt with it starts a fresh version history. Returns 404 when the toolbelt does not exist or is already deleted. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name. ##### Request: `/v2/action-gateway/toolbelts/{name}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt" ``` #### Responses **200** The toolbelt was deprecated. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `toolbelt` object optional After adding or removing tools: the new version, or the current version when membership did not change. After a delete: the latest version, with status deprecated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@1", "reference_latest": "search-toolbelt", "status": "deprecated", "tool_count": 2, "tools": [ "exa_web_fetch@1", "exa_web_search@1" ], "updated_at": "2026-06-15T10:00:00Z", "version": "1" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List the Providers in a Toolbelt `/v2/action-gateway/toolbelts/{name}/providers` Returns the distinct providers of the toolbelt's members, each with its member count, sorted by provider ID. List one provider's members with `GET .../toolbelts/{name}/providers/{provider}/tools`. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name. #### Query Parameters `version` string optional Example: `1` Version number to read. Empty reads the latest version. `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` `search` string optional Example: `search` Restricts providers whose ID, name, or description contains this value, case-insensitively. ##### Request: `/v2/action-gateway/toolbelts/{name}/providers` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt/providers" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of providers. `providers` array of object optional Providers sorted by ID. **Show child properties** `categories` array of string optional Example: `["web-search"]` The distinct tool categories among this toolbelt's members for the provider (sorted). Empty for `_legacy` or when no member has a category. `created_at` string (date-time) optional Nullable Example: `2026-06-01T00:00:00Z` When the provider was added to the catalog. Unset for `_legacy`. `description` string optional Example: `Web search tools backed by Exa.` Provider description. Empty for `_legacy`. `id` string optional Example: `exa` Equals provider; present so the entry has the same shape as a toolkit. `name` string optional Example: `Exa` The provider's display name. Empty for `_legacy`. `provider` string optional Example: `exa` The provider ID. Members recorded without a provider are grouped under `_legacy`, which is also accepted in the provider path. `tool_count` integer (int32) optional Example: `2` How many toolbelt members belong to this provider. `toolbelt` object optional The toolbelt version the providers were read from. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 1 }, "providers": [ { "categories": [ "web-fetch", "web-search" ], "created_at": "2026-06-01T00:00:00Z", "description": "Web search tools backed by Exa.", "id": "exa", "name": "Exa", "provider": "exa", "tool_count": 2 } ], "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@1", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 2, "tools": [ "exa_web_fetch@1", "exa_web_search@1" ], "updated_at": "2026-06-11T12:00:00Z", "version": "1" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List a Toolbelt's Tools from One Provider `/v2/action-gateway/toolbelts/{name}/providers/{provider}/tools` Returns a page of catalog metadata for the toolbelt's members from the named provider, sorted by tool slug. An unknown provider returns an empty page. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name. `provider` string required Example: `exa` A provider ID from the toolbelt's provider list, or `_legacy` for members recorded without a provider. Matched exactly. #### Query Parameters `version` string optional Example: `1` Version number to read. Empty reads the latest version. `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` `search` string optional Example: `search` Restricts tools whose slug, name, title, description, provider, or category contains this value, case-insensitively, within the provider only. ##### Request: `/v2/action-gateway/toolbelts/{name}/providers/{provider}/tools` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt/providers/exa/tools" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of matching members. `tools` array of object optional Members sorted by tool slug. **Show child properties** `category` string optional Example: `web-search` Best-effort catalog metadata and is empty for a large share of the catalog. Do not rely on it being present. `description` string optional Example: `Search the public web with Exa and return relevant results with normalized text snippets.` What the tool does. `name` string optional Example: `web_search` The unqualified tool name, without the provider prefix. `provider` string optional Example: `exa` The ID of the provider that offers the tool, broken out so a client never has to split `tool_slug`. `title` string optional Example: `Web Search` Human-readable tool title. `tool_slug` string optional Example: `exa_web_search` The provider-qualified, stable tool identifier (`_`). Treat it as opaque and pass it back verbatim. `version` integer (int32) optional Example: `1` The version this toolbelt version pins for the member, matching the `@` suffix in the corresponding toolbelt.tools entry. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 2 }, "tools": [ { "category": "web-fetch", "description": "Fetch the contents of a public web page with Exa.", "name": "web_fetch", "provider": "exa", "title": "Web Fetch", "tool_slug": "exa_web_fetch", "version": 1 }, { "category": "web-search", "description": "Search the public web with Exa and return relevant results with normalized text snippets.", "name": "web_search", "provider": "exa", "title": "Web Search", "tool_slug": "exa_web_search", "version": 1 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Tools to a Toolbelt `/v2/action-gateway/toolbelts/{name}/tools/add` Adds the listed tools and returns the toolbelt. When membership changes, this creates a new version that keeps the display name and description. Tools already in the toolbelt are left as they are, so a request that adds nothing new returns the current version unchanged. Returns 400 when a tool is not an active catalog tool, when a pin differs from the tool's current released version or from the version the toolbelt already holds, or when the toolbelt would exceed 500 tools. Returns 404 for an unknown or deleted toolbelt. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name, from the path. #### Request Body: `application/json` `tools` array of string required Example: `["exa_web_search"]` Tool slugs (`_`) to add or remove, each optionally pinned as `@`. At least one is required. When adding, a pin must equal the tool's current released version. ##### Request: `/v2/action-gateway/toolbelts/{name}/tools/add` ### Payload Content type `application/json` ```json { "tools": [ "jira_create_issue" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tools":["jira_create_issue"]}' \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt/tools/add" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `toolbelt` object optional After adding or removing tools: the new version, or the current version when membership did not change. After a delete: the latest version, with status deprecated. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@2", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 3, "tools": [ "exa_web_fetch@1", "exa_web_search@1", "jira_create_issue@1" ], "updated_at": "2026-06-12T09:30:00Z", "version": "2" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Remove Tools from a Toolbelt `/v2/action-gateway/toolbelts/{name}/tools/remove` Removes the listed tools and returns the toolbelt. When membership changes, this creates a new version that keeps the display name and description. Tools that are not members are ignored, and removing every tool is allowed; deleting the toolbelt itself is a separate DELETE. Returns 400 when a pin differs from the version the toolbelt holds, and 404 for an unknown or deleted toolbelt. #### Path Parameters `name` string required Example: `search-toolbelt` Toolbelt name, from the path. #### Request Body: `application/json` `tools` array of string required Example: `["exa_web_search"]` Tool slugs (`_`) to add or remove, each optionally pinned as `@`. At least one is required. When adding, a pin must equal the tool's current released version. ##### Request: `/v2/action-gateway/toolbelts/{name}/tools/remove` ### Payload Content type `application/json` ```json { "tools": [ "exa_web_fetch" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tools":["exa_web_fetch"]}' \ "https://api.digitalocean.com/v2/action-gateway/toolbelts/search-toolbelt/tools/remove" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `toolbelt` object optional After adding or removing tools: the new version, or the current version when membership did not change. After a delete: the latest version, with status deprecated. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "toolbelt": { "created_at": "2026-06-11T12:00:00Z", "description": "Tools for searching and fetching public web pages.", "display_name": "Search Tools", "name": "search-toolbelt", "reference": "search-toolbelt@2", "reference_latest": "search-toolbelt", "status": "active", "tool_count": 1, "tools": [ "exa_web_search@1" ], "updated_at": "2026-06-12T09:30:00Z", "version": "2" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Tools `/v2/action-gateway/tools` Returns one page of the tools your team can use: released catalog tools plus the enabled tools of your team's MCP servers. definitions\[i] describes tools\[i]. Offset-paged with page and `per_page`; an unknown `toolkitId` returns an empty page. #### Query Parameters `toolkit_id` string optional Example: `exa` Restricts the page to one provider. It accepts the provider ID the catalog returns, including the `serverRef` of one of your team's MCP servers. `page` integer >= 1 optional Example: `1` 1-based page index; values below 1 are treated as 1. A page past the end returns an empty tools list with the real total. Default: `1` `per_page` integer 1 – 100 optional Example: `100` Page size. Defaults to 100 when omitted or 0; values above 100 are capped at 100. Default: `100` ##### Request: `/v2/action-gateway/tools` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools?toolkit_id=exa&per_page=100" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `definitions` array of object optional definitions\[i] describes tools\[i]. **Show child properties** `annotations` object optional Advisory behavior hints for the tool. `auth` object optional Nullable Names the provider account the tool acts through and the scopes it requests. **Show child properties** `modes` array of string optional Example: `["shared_key"]` Lists how the tool authenticates: oauth (a user connection), `user_token` (a key your team supplies), `shared_key` (a key DigitalOcean supplies), or none. `provider` string optional Example: `exa` The provider slug a connection is created for. Empty when the tool needs no provider account. `scopes` array of string optional Example: `[]` The provider permissions the tool requests. `cache` object optional Catalog cache policy for an eligible read-only, non-destructive tool. Omitted when the tool is not eligible. This does not enable caching for a session; opt in through config.cache at session creation. **Show child properties** `ttlSeconds` integer required Example: `120` Maximum cache lifetime in seconds for this tool version. `description` string optional Example: `Search the public web with Exa and return relevant results with normalized text snippets.` What the tool does. `inputSchema` object optional Nullable Example: `{"properties":{"query":{"type":"string"}},"required":["query"],"type":"object"}` The JSON Schema the tool's arguments must satisfy. `name` string optional Example: `web_search` The tool name without the provider prefix. `outputSchema` object optional Nullable Example: `{"properties":{"results":{"items":{"type":"object"},"type":"array"}},"type":"object"}` The JSON Schema of the tool's result, when declared. `providerKind` string optional Example: `managed_api` Classifies the provider: native, `managed_api`, `customer_mcp`, sandbox, or `byo_mcp` (one of your team's MCP servers). `title` string optional Example: `Web Search` Human-readable tool title. `toolId` string optional Example: `tul_exa_web_search` The opaque identity of this released tool version. `toolSlug` string optional Example: `exa_web_search` The provider-qualified tool identifier `_`. Treat it as opaque and pass it back verbatim. `toolkitId` string optional Example: `exa` The ID of the provider that offers the tool. For a tool from one of your team's MCP servers it is that server's `serverRef`. `version` string optional Example: `v1` The released version, for example `v3`. `pagination` object optional page and `per_page` echo the values applied; total is the number of tools matching `toolkitId` across all pages. `tools` array of object optional Tools on this page, grouped by provider and sorted by name within a provider. **Show child properties** `annotations` object optional Advisory behavior hints for the tool. `description` string optional Example: `Search the public web with Exa and return relevant results with normalized text snippets.` What the tool does. `inputSchema` object optional Nullable JSON Schema the tool's arguments must satisfy. `name` string optional Example: `web_search` Tool name, without the provider prefix. `outputSchema` object optional Nullable JSON Schema of the tool's result, when declared. `parallelizable` boolean optional Example: `true` Catalog hint that calls to the tool may run in parallel. `streamingSafe` boolean optional Example: `true` Catalog hint that the tool's result can be streamed. `title` string optional Example: `Web Search` Human-readable tool title. `toolSlug` string optional Example: `exa_web_search` The provider-qualified, stable tool identifier `_`. Pass this value back verbatim to the toolbelt add/remove endpoints; clients should treat it as opaque rather than reconstructing it from `toolkitId` and name. `toolkitId` string optional Example: `exa` ID of the provider that offers the tool. For a tool from one of your team's MCP servers it is that server's `serverRef`. `version` string optional Example: `v1` Released version, for example `v3`. `version` string optional Example: `v1` Catalog version identifier, for example `v1`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "definitions": [ { "annotations": { "destructiveHint": false, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": true, "title": "Web Search" }, "auth": { "modes": [ "shared_key" ], "provider": "exa", "scopes": [] }, "description": "Search the public web with Exa and return relevant results with normalized text snippets.", "inputSchema": { "properties": { "max_results": { "description": "Maximum number of search results to return.", "type": "integer" }, "query": { "description": "Search query string.", "type": "string" } }, "required": [ "query" ], "type": "object" }, "name": "web_search", "outputSchema": { "additionalProperties": false, "properties": { "provider": { "type": "string" }, "query": { "type": "string" }, "results": { "items": { "properties": { "publishedDate": { "type": "string" }, "text": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "providerKind": "managed_api", "title": "Web Search", "toolId": "tul_exa_web_search", "toolSlug": "exa_web_search", "toolkitId": "exa", "version": "v1" } ], "pagination": { "page": 1, "per_page": 100, "total": 1 }, "tools": [ { "annotations": { "destructiveHint": false, "idempotentHint": true, "openWorldHint": true, "readOnlyHint": true, "title": "Web Search" }, "description": "Search the public web with Exa and return relevant results with normalized text snippets.", "inputSchema": { "properties": { "max_results": { "description": "Maximum number of search results to return.", "type": "integer" }, "query": { "description": "Search query string.", "type": "string" } }, "required": [ "query" ], "type": "object" }, "name": "web_search", "outputSchema": { "additionalProperties": false, "properties": { "provider": { "type": "string" }, "query": { "type": "string" }, "results": { "items": { "properties": { "publishedDate": { "type": "string" }, "text": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "parallelizable": true, "streamingSafe": true, "title": "Web Search", "toolSlug": "exa_web_search", "toolkitId": "exa", "version": "v1" } ], "version": "v1" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Tool Health `/v2/action-gateway/tools/health` Returns availability and latency for each catalog tool over the requested window, sorted by provider and then tool slug. A tool with no calls in the window is listed with `data_status` `HEALTH_DATA_STATUS_NO_DATA`. Metrics are aggregated across all customers; request volumes are not reported. Tools of your team's MCP servers are not included. Offset-paged with page and `per_page`. #### Query Parameters `provider` string optional Example: `exa` Optional provider ID, matched exactly, to return only that provider's tools. `window` string, one of: HEALTH_WINDOW_ONE_HOUR, HEALTH_WINDOW_TWENTY_FOUR_HOURS, HEALTH_WINDOW_SEVEN_DAYS, HEALTH_WINDOW_THIRTY_DAYS optional Example: `HEALTH_WINDOW_SEVEN_DAYS` Window to aggregate over. Defaults to twenty-four hours. - `HEALTH_WINDOW_UNSPECIFIED`: Twenty-four hours. - `HEALTH_WINDOW_ONE_HOUR`: One hour; history points are 10 minutes. - `HEALTH_WINDOW_TWENTY_FOUR_HOURS`: Twenty-four hours; history points are 1 hour. - `HEALTH_WINDOW_SEVEN_DAYS`: Seven days; history points are 6 hours. - `HEALTH_WINDOW_THIRTY_DAYS`: Thirty days; history points are 24 hours. Default: `HEALTH_WINDOW_TWENTY_FOUR_HOURS` `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/tools/health` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/health?provider=exa" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of tools. `snapshot` object optional When the metrics were computed and the window they cover. `tools` array of object optional Tools sorted by provider, then tool slug. **Show child properties** `health` object optional Metrics over the window. `provider` string optional Example: `exa` ID of the provider that offers the tool. `tool_slug` string optional Example: `exa_web_search` Catalog tool slug. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 1 }, "snapshot": { "measured_at": "2026-09-24T12:00:00Z", "stale": false, "window": "86400s" }, "tools": [ { "health": { "data_status": "HEALTH_DATA_STATUS_AVAILABLE", "latency_p50_ms": 412.5, "latency_p95_ms": 1180, "uptime_percentage": 99.82 }, "provider": "exa", "tool_slug": "exa_web_search" } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Provider Health `/v2/action-gateway/tools/health/providers` Returns availability and latency for each catalog provider over the requested window, sorted by provider ID. Metrics are aggregated across all customers; request volumes are not reported. Tools of your team's MCP servers are not included. Offset-paged with page and `per_page`. #### Query Parameters `provider` string optional Example: `exa` Optional provider ID, matched exactly, to return only that provider. `window` string, one of: HEALTH_WINDOW_ONE_HOUR, HEALTH_WINDOW_TWENTY_FOUR_HOURS, HEALTH_WINDOW_SEVEN_DAYS, HEALTH_WINDOW_THIRTY_DAYS optional Example: `HEALTH_WINDOW_SEVEN_DAYS` Window to aggregate over. Defaults to twenty-four hours. - `HEALTH_WINDOW_UNSPECIFIED`: Twenty-four hours. - `HEALTH_WINDOW_ONE_HOUR`: One hour; history points are 10 minutes. - `HEALTH_WINDOW_TWENTY_FOUR_HOURS`: Twenty-four hours; history points are 1 hour. - `HEALTH_WINDOW_SEVEN_DAYS`: Seven days; history points are 6 hours. - `HEALTH_WINDOW_THIRTY_DAYS`: Thirty days; history points are 24 hours. Default: `HEALTH_WINDOW_TWENTY_FOUR_HOURS` `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/tools/health/providers` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/health/providers?window=HEALTH_WINDOW_TWENTY_FOUR_HOURS" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of providers. `providers` array of object optional Providers sorted by ID. **Show child properties** `health` object optional Metrics over the window. `provider` string optional Example: `exa` Provider ID. `snapshot` object optional When the metrics were computed and the window they cover. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 1 }, "providers": [ { "health": { "data_status": "HEALTH_DATA_STATUS_AVAILABLE", "latency_p50_ms": 412.5, "latency_p95_ms": 1180, "uptime_percentage": 99.82 }, "provider": "exa" } ], "snapshot": { "measured_at": "2026-09-24T12:00:00Z", "stale": false, "window": "86400s" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Tool Health `/v2/action-gateway/tools/health/tools/{tool_slug}` Returns availability and latency for one catalog tool over the requested window, optionally with a history series. Metrics are aggregated across all customers; request volumes are not reported. Returns 404 when `tool_slug` is not a catalog tool. #### Path Parameters `tool_slug` string required Example: `exa_web_search` Catalog tool slug, for example `exa_search`. Required. #### Query Parameters `window` string, one of: HEALTH_WINDOW_ONE_HOUR, HEALTH_WINDOW_TWENTY_FOUR_HOURS, HEALTH_WINDOW_SEVEN_DAYS, HEALTH_WINDOW_THIRTY_DAYS optional Example: `HEALTH_WINDOW_SEVEN_DAYS` Window to aggregate over. Defaults to twenty-four hours. - `HEALTH_WINDOW_UNSPECIFIED`: Twenty-four hours. - `HEALTH_WINDOW_ONE_HOUR`: One hour; history points are 10 minutes. - `HEALTH_WINDOW_TWENTY_FOUR_HOURS`: Twenty-four hours; history points are 1 hour. - `HEALTH_WINDOW_SEVEN_DAYS`: Seven days; history points are 6 hours. - `HEALTH_WINDOW_THIRTY_DAYS`: Thirty days; history points are 24 hours. Default: `HEALTH_WINDOW_TWENTY_FOUR_HOURS` `include_history` boolean optional Example: `true` Additionally returns the window split into resolution-aligned points (the history field below). Default: `false` ##### Request: `/v2/action-gateway/tools/health/tools/{tool_slug}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/health/tools/exa_web_search?window=HEALTH_WINDOW_ONE_HOUR&include_history=true" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `history` object optional Nullable Present only when the request set `include_history`. **Show child properties** `points` array of object optional Points oldest first, ending with the slot in progress. **Show child properties** `bucket_start` string (date-time) optional Example: `2026-09-24T11:00:00Z` Start of the slot. `health` object optional Metrics over the slot. `resolution` string optional Example: `3600s` Length of each point. `stale` boolean optional Example: `false` Means the same as HealthSnapshot.stale, for the history series. The series is refreshed independently, so a fresh snapshot can accompany an older history and vice versa. `snapshot` object optional When the metrics were computed and the window they cover. `tool` object optional The tool's metrics over the window. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "history": { "points": [ { "bucket_start": "2026-09-24T11:10:00Z", "health": { "data_status": "HEALTH_DATA_STATUS_AVAILABLE", "latency_p50_ms": 412.5, "latency_p95_ms": 1180, "uptime_percentage": 99.82 } }, { "bucket_start": "2026-09-24T11:20:00Z", "health": { "data_status": "HEALTH_DATA_STATUS_NO_DATA", "latency_p50_ms": null, "latency_p95_ms": null, "uptime_percentage": null } } ], "resolution": "600s", "stale": false }, "snapshot": { "measured_at": "2026-09-24T12:00:00Z", "stale": false, "window": "3600s" }, "tool": { "health": { "data_status": "HEALTH_DATA_STATUS_AVAILABLE", "latency_p50_ms": 412.5, "latency_p95_ms": 1180, "uptime_percentage": 99.82 }, "provider": "exa", "tool_slug": "exa_web_search" } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Tool Versions `/v2/action-gateway/tools/{tool_slug}/versions` Returns the released versions of one catalog tool, newest first, each with the changes from the version released before it. Every version listed can be pinned as `@` in an endpoint or toolbelt, and a pin keeps calling that version after newer versions are released. A tool named without a version always calls the latest release, marked `latest`. Changes are computed by comparing each version's input schema, output schema, and required OAuth scopes with the previous released version. `breaking` marks a change that can make a call that worked against the previous version fail; review those before moving a pin or relying on the latest release. Returns 404 when `tool_slug` is not a catalog tool. Tools of your team's MCP servers are not listed. #### Path Parameters `tool_slug` string required Example: `exa_web_search` Catalog tool slug, for example `exa_search`. Required. #### Query Parameters `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response. Valid only with the same tool selection; otherwise the request is rejected with 400. ##### Request: `/v2/action-gateway/tools/{tool_slug}/versions` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/supabase_list_organizations/versions?page_size=20" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Example: `djE1` Pass as `page_token` to read older versions. Empty on the last page. `versions` array of object optional Released versions, newest first. **Show child properties** `breaking` boolean optional Example: `true` True when any change is breaking. `changes` array of object optional Changes from `previous_version`, input changes first, then output, then scopes. Descriptions, titles, and examples are not compared. **Show child properties** `breaking` boolean optional Example: `true` True when a call that worked against the previous version can fail against this one. `path` string optional Example: `page.cursor` Dotted path of the schema property that changed, for example `page.cursor`. `items[]` names an array's elements. Empty for the schema root and for scope changes. `type` string (enum) optional Example: `requiredScopesAdded` What changed. `inputPropertyAdded` is breaking when the property is required. `inputTypeChanged` and `outputTypeChanged` list the new types in `values`, and are breaking when a previously accepted input type is no longer accepted or an output can hold a new type. `requiredScopesAdded` is breaking because a connection authorized before the version may lack the scopes and must be reconnected. `inputSchemaChanged` and `outputSchemaChanged` cover other schema changes and are reported as breaking, except when an output schema is declared for the first time. `values` array of string optional Example: `["organizations:read"]` The values the change concerns, sorted: enum values added or removed, the property's new types, or the scopes added or removed. Empty otherwise. `latest` boolean optional Example: `true` True for the version calls without a pinned version currently use. At most one version is latest; none is while a tool is withdrawn from the catalog. `previous_version` string optional Example: `v16` The released version this one is compared with. Empty for the oldest version listed, which has no changes. `released_at` string (date-time) optional Example: `2026-11-12T09:30:00Z` When this version was first released. `tool_slug` string optional Example: `supabase_list_organizations` Catalog tool slug. `version` string optional Example: `v17` Version, for example `v3`. Pin it as `@v3`. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "djE1", "versions": [ { "breaking": true, "changes": [ { "breaking": true, "type": "requiredScopesAdded", "values": [ "organizations:read" ] } ], "latest": true, "previous_version": "v16", "released_at": "2026-11-12T09:30:00Z", "tool_slug": "supabase_list_organizations", "version": "v17" }, { "breaking": false, "changes": [ { "breaking": false, "path": "page.cursor", "type": "inputPropertyAdded" } ], "latest": false, "previous_version": "v15", "released_at": "2026-10-20T14:05:00Z", "tool_slug": "supabase_list_organizations", "version": "v16" } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Providers `/v2/action-gateway/tools/providers` Returns the active catalog providers with at least one released tool, sorted by display name, with the credential kinds each accepts and the parameters a connection or team credential needs. Your team's MCP servers are listed separately under `/v2/action-gateway/mcp-servers`. ##### Request: `/v2/action-gateway/tools/providers` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/providers" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `providers` array of object optional Providers sorted by display name. **Show child properties** `auth_type` string optional Deprecated Example: `oauth` Deprecated: read `auth_types`, since a provider may accept more than one credential kind. This is the first entry of `auth_types` other than `none`, or `none` when that is the only entry. `auth_types` array of string optional Example: `["oauth"]` Credential kinds the provider accepts, sorted: none|oauth|`shared_api_key`|unknown|`user_oauth_app`|`user_token`. `none` means the provider needs no credential. `oauth` means users can connect through DigitalOcean's shared OAuth application. `user_oauth_app` means users can connect through an OAuth client your team registers as a provider credential; without `oauth` alongside it, that is the only way to connect. `shared_api_key` means DigitalOcean supplies the key. `user_token` means your team or its users supply a key or token. `unknown` means the provider declares no kind this API recognizes, including an OAuth provider whose shared application is not available. It is never paired with another kind. `connection_parameters` array of object optional Non-sensitive values collected when creating a connection. Set only when `auth_types` contains `oauth` or `user_oauth_app`. **Show child properties** `allowed_host_suffixes` array of string optional Example: `["atlassian.net"]` For `https_origin` inputs, the host suffixes the origin's host must match. `allowed_values` array of string optional Example: `[]` For enum inputs, the accepted values. `description` string optional Example: `The HTTPS origin of the Jira Cloud site to use.` Help text. `input_kind` string, one of: string, https_origin, enum optional Example: `https_origin` How the value is entered: string, `https_origin`, or enum. `key` string optional Example: `site_url` Key of the value in `connection_parameters` or `credential_parameters`. `label` string optional Example: `Jira site URL` Display label. `max_length` integer (int32) optional Example: `255` Maximum length of the value. 0 means the default maximum of 4096. `normalization` string optional Example: `https_origin` How the value is normalized before it is validated and stored: trim, lowercase, uppercase, or `https_origin`. `pattern` string optional Optional RE2 expression matched against the whole normalized value. `required` boolean optional Example: `true` Whether the value must be supplied. `credential_parameters` array of object optional Non-secret values collected when registering an API key provider credential. They are validated against the provider's declaration and used to derive the credential's `base_url`; callers cannot supply header names or arbitrary destinations. **Show child properties** `allowed_host_suffixes` array of string optional Example: `["atlassian.net"]` For `https_origin` inputs, the host suffixes the origin's host must match. `allowed_values` array of string optional Example: `[]` For enum inputs, the accepted values. `description` string optional Example: `The HTTPS origin of the Jira Cloud site to use.` Help text. `input_kind` string, one of: string, https_origin, enum optional Example: `https_origin` How the value is entered: string, `https_origin`, or enum. `key` string optional Example: `site_url` Key of the value in `connection_parameters` or `credential_parameters`. `label` string optional Example: `Jira site URL` Display label. `max_length` integer (int32) optional Example: `255` Maximum length of the value. 0 means the default maximum of 4096. `normalization` string optional Example: `https_origin` How the value is normalized before it is validated and stored: trim, lowercase, uppercase, or `https_origin`. `pattern` string optional Optional RE2 expression matched against the whole normalized value. `required` boolean optional Example: `true` Whether the value must be supplied. `description` string optional Example: `Jira issue tracking tools.` Provider description. `display_name` string optional Example: `Jira` Human-readable provider name. `name` string optional Example: `jira` Provider slug, used as provider when creating a connection or a provider credential. `oauth_client_setup_url` string optional Example: `https://developer.atlassian.com/console/myapps/` HTTPS page at the provider where a team creates that OAuth client, such as its developer console or setup guide. Empty unless `auth_types` contains `user_oauth_app` and the provider declares one. `oauth_redirect_url` string optional Example: `https://cloud.digitalocean.com/api/v1/security/connectlinks/callback` Callback URL a team must register with the provider when it creates its own OAuth client. It is the same for every provider and cannot be changed per credential. Empty unless `auth_types` contains `user_oauth_app`. `scopes` array of string optional Example: `["write:jira-work"]` The OAuth scopes a connection may request; a connection that requests none gets all of them. Set only when `auth_types` contains `oauth` or `user_oauth_app`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "providers": [ { "auth_type": "shared_api_key", "auth_types": [ "shared_api_key" ], "connection_parameters": [], "credential_parameters": [], "description": "Web search tools backed by Exa.", "display_name": "Exa", "name": "exa", "oauth_client_setup_url": "https://developer.atlassian.com/console/myapps/", "oauth_redirect_url": "https://cloud.digitalocean.com/api/v1/security/connectlinks/callback", "scopes": [] }, { "auth_type": "oauth", "auth_types": [ "oauth" ], "connection_parameters": [ { "allowed_host_suffixes": [ "atlassian.net" ], "allowed_values": [], "description": "The HTTPS origin of the Jira Cloud site to use.", "input_kind": "https_origin", "key": "site_url", "label": "Jira site URL", "max_length": 255, "normalization": "https_origin", "pattern": "", "required": true } ], "credential_parameters": [], "description": "Jira issue tracking tools.", "display_name": "Jira", "name": "jira", "oauth_client_setup_url": "https://developer.atlassian.com/console/myapps/", "oauth_redirect_url": "https://cloud.digitalocean.com/api/v1/security/connectlinks/callback", "scopes": [ "write:jira-work" ] } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Search Providers `/v2/action-gateway/tools/providers/search` Returns the providers of `GET /v2/action-gateway/tools/providers` whose name, display name, or description contains query, case-insensitively, sorted by name. Cursor-paged with `page_size` and `page_token`; no total is reported. #### Query Parameters `query` string optional Example: `search` Matched case-insensitively as a substring of name, `display_name`, or description. It does not match the titles of the tools a provider owns: "providers owning a tool that matches" is a tool search grouped by the provider field of each result. `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` `next_page_token` from the previous response. Valid only with the same query; otherwise the request is rejected with 400. ##### Request: `/v2/action-gateway/tools/providers/search` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/providers/search?query=jira" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Token for the next page; empty on the last page. `providers` array of object optional Matching providers sorted by name. **Show child properties** `auth_type` string optional Deprecated Example: `oauth` Deprecated: read `auth_types`, since a provider may accept more than one credential kind. This is the first entry of `auth_types` other than `none`, or `none` when that is the only entry. `auth_types` array of string optional Example: `["oauth"]` Credential kinds the provider accepts, sorted: none|oauth|`shared_api_key`|unknown|`user_oauth_app`|`user_token`. `none` means the provider needs no credential. `oauth` means users can connect through DigitalOcean's shared OAuth application. `user_oauth_app` means users can connect through an OAuth client your team registers as a provider credential; without `oauth` alongside it, that is the only way to connect. `shared_api_key` means DigitalOcean supplies the key. `user_token` means your team or its users supply a key or token. `unknown` means the provider declares no kind this API recognizes, including an OAuth provider whose shared application is not available. It is never paired with another kind. `connection_parameters` array of object optional Non-sensitive values collected when creating a connection. Set only when `auth_types` contains `oauth` or `user_oauth_app`. **Show child properties** `allowed_host_suffixes` array of string optional Example: `["atlassian.net"]` For `https_origin` inputs, the host suffixes the origin's host must match. `allowed_values` array of string optional Example: `[]` For enum inputs, the accepted values. `description` string optional Example: `The HTTPS origin of the Jira Cloud site to use.` Help text. `input_kind` string, one of: string, https_origin, enum optional Example: `https_origin` How the value is entered: string, `https_origin`, or enum. `key` string optional Example: `site_url` Key of the value in `connection_parameters` or `credential_parameters`. `label` string optional Example: `Jira site URL` Display label. `max_length` integer (int32) optional Example: `255` Maximum length of the value. 0 means the default maximum of 4096. `normalization` string optional Example: `https_origin` How the value is normalized before it is validated and stored: trim, lowercase, uppercase, or `https_origin`. `pattern` string optional Optional RE2 expression matched against the whole normalized value. `required` boolean optional Example: `true` Whether the value must be supplied. `credential_parameters` array of object optional Non-secret values collected when registering an API key provider credential. They are validated against the provider's declaration and used to derive the credential's `base_url`; callers cannot supply header names or arbitrary destinations. **Show child properties** `allowed_host_suffixes` array of string optional Example: `["atlassian.net"]` For `https_origin` inputs, the host suffixes the origin's host must match. `allowed_values` array of string optional Example: `[]` For enum inputs, the accepted values. `description` string optional Example: `The HTTPS origin of the Jira Cloud site to use.` Help text. `input_kind` string, one of: string, https_origin, enum optional Example: `https_origin` How the value is entered: string, `https_origin`, or enum. `key` string optional Example: `site_url` Key of the value in `connection_parameters` or `credential_parameters`. `label` string optional Example: `Jira site URL` Display label. `max_length` integer (int32) optional Example: `255` Maximum length of the value. 0 means the default maximum of 4096. `normalization` string optional Example: `https_origin` How the value is normalized before it is validated and stored: trim, lowercase, uppercase, or `https_origin`. `pattern` string optional Optional RE2 expression matched against the whole normalized value. `required` boolean optional Example: `true` Whether the value must be supplied. `description` string optional Example: `Jira issue tracking tools.` Provider description. `display_name` string optional Example: `Jira` Human-readable provider name. `name` string optional Example: `jira` Provider slug, used as provider when creating a connection or a provider credential. `oauth_client_setup_url` string optional Example: `https://developer.atlassian.com/console/myapps/` HTTPS page at the provider where a team creates that OAuth client, such as its developer console or setup guide. Empty unless `auth_types` contains `user_oauth_app` and the provider declares one. `oauth_redirect_url` string optional Example: `https://cloud.digitalocean.com/api/v1/security/connectlinks/callback` Callback URL a team must register with the provider when it creates its own OAuth client. It is the same for every provider and cannot be changed per credential. Empty unless `auth_types` contains `user_oauth_app`. `scopes` array of string optional Example: `["write:jira-work"]` The OAuth scopes a connection may request; a connection that requests none gets all of them. Set only when `auth_types` contains `oauth` or `user_oauth_app`. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "providers": [ { "auth_type": "oauth", "auth_types": [ "oauth" ], "connection_parameters": [ { "allowed_host_suffixes": [ "atlassian.net" ], "allowed_values": [], "description": "The HTTPS origin of the Jira Cloud site to use.", "input_kind": "https_origin", "key": "site_url", "label": "Jira site URL", "max_length": 255, "normalization": "https_origin", "pattern": "", "required": true } ], "credential_parameters": [], "description": "Jira issue tracking tools.", "display_name": "Jira", "name": "jira", "oauth_client_setup_url": "https://developer.atlassian.com/console/myapps/", "oauth_redirect_url": "https://cloud.digitalocean.com/api/v1/security/connectlinks/callback", "scopes": [ "write:jira-work" ] } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Search Tools `/v2/action-gateway/tools/search` Returns the tools your team can use that match query, optionally restricted to some providers or to the members of one of your toolbelts. Results are ranked across the whole result set: exact tool name matches first, then name or title prefixes, then name or title substrings, then other matches. Cursor-paged with `page_size` and `page_token`; no total is reported. #### Query Parameters `query` string optional Example: `search` Matched case- and accent-insensitively as a substring of the tool's name, title, description, category, provider ID, or tool slug. Empty matches every tool your team can use. `provider` array of string optional Example: `["exa"]` Restricts results to these provider IDs, OR'd together. Repeat the parameter to select several. An unknown ID matches nothing. `toolbelt` string optional Example: `search-toolbelt` Restricts results to the members of that toolbelt of your team at its latest version, combined with query and provider as AND. Members are matched at the version the toolbelt pins, which is the same set and the same versions `GET /v2/action-gateway/toolbelts/{name}` reports. An unknown or deleted toolbelt returns 404 rather than an empty page. `page_size` integer 1 – 100 optional Example: `20` Page size, 1 to 100. Defaults to 20 when omitted or 0; other values are rejected with 400. Default: `20` `page_token` string optional Example: `ZXhhX3dlYl9zZWFyY2hAMQ` A `next_page_token` from the preceding response. It is pinned to the query and filters that produced it: replaying one against a different search is rejected with 400, not a silent restart from the top. ##### Request: `/v2/action-gateway/tools/search` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/search?query=search&provider=exa" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Token for the next page; empty on the last page. `tools` array of object optional Ordered by descending match quality, then by provider and name. The ordering is applied across the whole result set rather than within a page, so a client must not re-sort a page to rank it. **Show child properties** `category` string optional Example: `web-search` Best-effort catalog metadata and is empty for a large share of the catalog. Do not rely on it being present. `description` string optional Example: `Search the public web with Exa and return relevant results with normalized text snippets.` What the tool does. `name` string optional Example: `web_search` The unqualified tool name, without the provider prefix. `provider` string optional Example: `exa` The owning toolkit ID, broken out so a client never has to split `tool_slug`. It is what a client groups results by. `title` string optional Example: `Web Search` Human-readable tool title. `tool_slug` string optional Example: `exa_web_search` The provider-qualified, stable tool identifier (`_`). Treat it as opaque and pass it back verbatim. `version` integer (int32) optional Example: `1` The released version number of the tool, for example 3. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "tools": [ { "category": "web-search", "description": "Search the public web with Exa and return relevant results with normalized text snippets.", "name": "web_search", "provider": "exa", "title": "Web Search", "tool_slug": "exa_web_search", "version": 1 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Toolkits `/v2/action-gateway/tools/toolkits` Returns the providers (toolkits) whose tools your team can use: catalog providers with at least one released tool, plus your team's registered MCP servers. ##### Request: `/v2/action-gateway/tools/toolkits` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/tools/toolkits" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `toolkits` array of object optional Toolkits available to your team. **Show child properties** `categories` array of string optional Example: `["web-search"]` Distinct categories of the provider's released tools, sorted. `created_at` string (date-time) optional Nullable Example: `2026-06-01T00:00:00Z` When the provider was added. `description` string optional Example: `Web search tools backed by Exa.` Provider description. `id` string optional Example: `exa` Provider ID. For one of your team's MCP servers it is normally the server's `serverRef`; `provider_kind` tells the two kinds apart. `name` string optional Example: `Exa` Human-readable provider name. `provider_kind` string optional Example: `managed_api` Classifies the provider, for example `managed_api` or `byo_mcp` (one of your team's MCP servers). It is the same value as PublicToolDefinition.provider_kind for the provider's tools. `version` string optional Example: `v1` Catalog version identifier, for example `v1`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "toolkits": [ { "categories": [ "web-fetch", "web-search" ], "created_at": "2026-06-01T00:00:00Z", "description": "Web search tools backed by Exa.", "id": "exa", "name": "Exa", "provider_kind": "managed_api" } ], "version": "v1" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Users `/v2/action-gateway/users` Returns the user IDs known for your team: session `actor_id` values, the `user_id` of connections that are not revoked, and actors with limit overrides. Only sessions and connections you can see count. Offset-paged with page and `per_page`. #### Query Parameters `user_id` string optional Example: `al` User ID prefix to return. An empty value returns all users. `sort` string, one of: created_at, user_id, session_count, connection_count optional Example: `session_count` `user_id`|`created_at`|`session_count`|`connection_count`. `created_at` is the earliest creation time among the user's sessions, connections, and limit overrides. Defaults to `created_at`. Default: `created_at` `sort_direction` string, one of: asc, desc optional Example: `desc` asc|desc. Defaults to desc. `page` integer >= 1 optional Example: `1` 1-based page number. Values below 1 are treated as 1. Default: `1` `per_page` integer 1 – 100 optional Example: `20` Page size. Defaults to 20; values above 100 are capped at 100. Default: `20` ##### Request: `/v2/action-gateway/users` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/users" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pagination` object optional Paging applied to this response and the total number of users. `user_ids` array of string optional Example: `["alice","bob"]` User IDs on this page. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pagination": { "page": 1, "per_page": 20, "total": 2 }, "user_ids": [ "alice", "bob" ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a User `/v2/action-gateway/users/{user_id}` Returns the sessions and non-revoked connections of one user ID. Returns 404 when the user has none you can see and no limit overrides. #### Path Parameters `user_id` string required Example: `alice` User ID. ##### Request: `/v2/action-gateway/users/{user_id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/action-gateway/users/alice" ``` #### Responses **200** The request was successful. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `user` object optional The user. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "user": { "connections": [ { "connection_parameters": { "site_url": "https://example.atlassian.net" }, "created_at": "2026-07-14T00:50:00Z", "credential_id": "", "credential_kind": "digitalocean_oauth", "granted_at": "2026-07-14T00:52:10Z", "id": "39f9f768-a7f9-4c91-9557-3328c53dd054", "network": null, "provider": "jira", "provider_display_name": "Jira", "revoked_at": null, "scopes": [ "write:jira-work" ], "status": "active", "updated_at": "2026-07-14T00:52:10Z", "user_id": "alice" } ], "sessions": [ { "created_at": "2026-09-24T12:00:00Z", "name": "support-bot-alice", "session_urn": "do:managed_agent_session:2b3c9f0e-1a4d-4e5f-8a7b-6c5d4e3f2a1b", "updated_at": "2026-09-24T12:00:00Z" } ], "user_id": "alice" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Action Gateway Tool Providers](https://docs.digitalocean.com/products/managed-agents/action-gateway/reference/providers/index.html.md), [How to Configure Server-Side Approval](https://docs.digitalocean.com/products/managed-agents/action-gateway/how-to/configure-server-side-approval/index.html.md), [Action Gateway Quickstart](https://docs.digitalocean.com/products/managed-agents/action-gateway/quickstart/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/actions/ --- title: Actions description: Actions are records of events that have occurred on the resources in your account. These can be things like rebooting a Droplet, or transferring an … product: Reference url: https://docs.digitalocean.com/reference/api/reference/actions/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Actions Generated on 4 Dec 2026 Actions are records of events that have occurred on the resources in your account. These can be things like rebooting a Droplet, or transferring an image to a new region. An action object is created every time one of these actions is initiated. The action object contains information about the current status of the action, start and complete timestamps, and the associated resource type and ID. Every action that creates an action object is available through this endpoint. Completed actions are not removed from this list and are always available for querying. **Note:** You can pass the following HTTP header with the request to have the API return the `reserved_ips` stanza instead of the `floating_ips` stanza: - `Accept: application/vnd.digitalocean.reserveip+json` Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Actions](#actions_list) - **GET** [Retrieve an Existing Action](#actions_get) ## GET List All Actions `/v2/actions` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: actions:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` This will be the entire list of actions taken on your account, so it will be quite large. As with any large collection returned by the API, the results will be paginated with only 20 on each page by default. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/actions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/actions?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } actions, _, err := client.Actions.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) actions = client.actions.all actions.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN")) list_resp = client.actions.list() ``` #### Responses **200** 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 Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `actions` array of object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "actions": [ { "completed_at": "2020-11-14T16:30:06Z", "id": 36804636, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-11-14T16:29:21Z", "status": "completed", "type": "create" } ], "links": { "pages": { "pages": { "first": "https://api.digitalocean.com/v2/account/keys?page=1", "prev": "https://api.digitalocean.com/v2/account/keys?page=2" } } }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Action `/v2/actions/{action_id}` To retrieve a specific action object, send a GET request to `/v2/actions/$ACTION_ID`. #### Path Parameters `action_id` integer >= 1 required Example: `36804636` A unique numeric ID that can be used to identify and reference an action. ##### Request: `/v2/actions/{action_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/actions/36804636" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() action, _, err := client.Actions.Get(ctx, 36804636) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.actions.find(id: 36804636) ``` ### Python ```python import os from pydo import Client client = Client(token=os.getenv("$DIGITALOCEAN_TOKEN")) get_resp = client.actions.get(action_id=36804636) ``` #### Responses **200** The result will be a JSON object with an action key. This will be set to an action object containing the standard action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "action": { "completed_at": "2020-11-14T16:30:06Z", "id": 36804636, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-11-14T16:29:21Z", "status": "completed", "type": "create" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/add-ons/ --- title: Add-Ons description: Add-ons are third-party applications that can be added to your DigitalOcean account. They are available through the [DigitalOcean … product: Reference url: https://docs.digitalocean.com/reference/api/reference/add-ons/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Add-Ons Generated on 4 Dec 2026 Add-ons are third-party applications that can be added to your DigitalOcean account. They are available through the [DigitalOcean Marketplace](https://marketplace.digitalocean.com/). Add-ons can be used to enhance the functionality of your existing resources or to provide additional services. The Add-Ons API allows you to manage these resources, including creating, listing, and retrieving details about specific add-on resources. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List Available Add-On Applications](#addons_get_app) - **GET** [Get Metadata for an Add-On Application](#addons_get_app_metadata) - **GET** [List all Add-On Resources](#addons_list) - **POST** [Create/Provision a New Add-on Resource](#addons_create) - **GET** [Get details on an Add-On Resource](#addons_get) - **PATCH** [Update the name for an Add-On Resource](#addons_patch) - **DELETE** [Delete/Deprovision an Add-on Resource](#addons_delete) - **PATCH** [Update the plan for an Add-On Resource](#addons_patch_plan) ## GET List Available Add-On Applications `/v2/add-ons/apps` **Authorizations: bearer_auth** Http: Bearer ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To fetch details of all available Add-On Applications, send a GET request to `/v2/add-ons/apps`. ##### Request: `/v2/add-ons/apps` ### cURL ```bash curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/add-ons/apps" ``` #### Responses **200** The response will be a JSON object with a key called apps. apps will be an array of objects. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `apps` array of object optional **Show child properties** `app_slug` string required Example: `example-app` The slug identifier for the application associated with the resource. `eula` string required Example: `https://example.com/eula` The End User License Agreement URL for the resource. `plans` array of object required A list of plans available for the resource. **Show child properties** `active` boolean required Example: `true` Indicates if the plan is currently active. `app_id` integer required Example: `2` ID of the app associated with this plan. `available` boolean required Example: `true` Indicates if the plan is available for selection. `by_default` boolean required Example: `false` Indicates if this plan is the default option for the app. `created_at` string (date-time) required Example: `2023-10-01T12:00:00Z` Timestamp when the plan was created. `description` string optional Example: `Description of the app plan.` Description of an app plan. `dimensions` array of object optional List of dimensions associated with the plan, each with its own pricing. **Show child properties** `display_name` string required Example: `Addon Dimension Display Name` Display name for the dimension. `feature_name` string required Example: `Feature Name` Name of the feature associated with the dimension. `id` integer required Example: `1` Unique identifier for the dimension. `sku` string required Example: `addon_sku_123` Unique string identifier for the dimension, tied to a price. `slug` string required Example: `addon_dimension_slug` Slug identifier for the dimension. `volumes` array of object required A list of volumes associated with the dimension, each with its own price. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `display_name` string required Example: `Basic Plan` Display name for a given plan. `features` array of object optional Example: `[]` List of features included in the plan. **Show child properties** `created_at` string (date-time) required Example: `2023-10-01T12:00:00Z` Timestamp when the feature was created. `id` integer required Example: `1` Unique identifier for the app feature. `name` string required Example: `Support` Name of the feature. `type` string, one of: unknown, string, boolean, allowance required Example: `string` Feature type, indicating the kind of data it holds. `unit` string (enum) optional Example: `GB` Unit of measurement for the feature, if applicable. Units apply to allowance features. `updated_at` string (date-time) required Example: `2023-10-01T12:00:00Z` Timestamp when the feature was last updated. `value` boolean | string required Example: `Unlimited` Value of the feature, which can vary based on the type. `id` integer required Example: `1` ID of a given plan. `price_per_month` integer required Example: `10` Price of a month's usage of the plan in US dollars. `slug` string required Example: `plan_basic` Slug identifier for the plan. `state` string (enum) required Example: `approved` Current state of the plan. `updated_at` string (date-time) required Example: `2023-10-01T12:00:00Z` Timestamp when the plan was last updated. `uuid` string required Example: `123e4567-e89b-12d3-a456-426 614174000` Unique identifier for the plan. `tos` string required Example: `https://example.com/tos` The Terms of Service URL for the resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "apps": [ { "app_slug": "example-app", "eula": "https://example.com/eula", "plans": [], "tos": "https://example.com/tos" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Metadata for an Add-On Application `/v2/add-ons/apps/{app_slug}/metadata` To find out what metadata is required for a specific add-on, send a GET request to `/v2/add-ons/apps/{app_slug}/metadata`. Metadata varies by application. #### Path Parameters `app_slug` string required Example: `example_app` The slug identifier for the application whose metadata is being requested. ##### Request: `/v2/add-ons/apps/{app_slug}/metadata` ### cURL ```bash curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/add-ons/apps/example-app/metadata" ``` #### Responses **200** The response will be a JSON object with a key called metadata. metadata will be an array of objects, each representing a metadata item for the app. Each object will contain details such as id, name, display_name, description, type, and options. For additional details specific to the app, find and view its DigitalOcean Marketplace page. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `metadata` array of object optional **Show child properties** `description` string required Example: `Country for localization` A brief description of the metadata item. `display_name` string required Example: `Country of Origin` The display name of the metadata item. `id` integer required Example: `1` Unique identifier for the addon metadata item. `name` string required Example: `country_of_origin` The name of the metadata item. `options` array of string optional Example: `["US","UK","CA"]` `type` string, one of: string, boolean required Example: `string` The data type of the metadata value. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "metadata": [ { "description": "Country for localization", "display_name": "Country of Origin", "id": 1, "name": "country_of_origin", "options": [ "US", "UK", "CA" ], "type": "string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List all Add-On Resources `/v2/add-ons/saas` To fetch all Add-On Resources under your team, send a GET request to `/v2/add-ons/saas`. ##### Request: `/v2/add-ons/saas` ### cURL ```bash curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/add-ons/saas" ``` #### Responses **200** The response will be an array of JSON objects with a key called resources. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resources` array of object optional **Show child properties** `app_name` string optional Example: `Example App` The name of the application associated with the resource. `app_slug` string required Example: `example_app` The slug identifier for the application associated with the resource. `has_config` boolean required Example: `true` Indicates if the resource has configuration values set by the vendor. `message` string optional Example: `Resource is provisioned successfully.` A message related to the resource, if applicable. `metadata` array of object optional Metadata associated with the resource, set by the user. **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_name` string optional Example: `Basic Plan` The name of the plan associated with the resource. `plan_price_per_month` integer optional Example: `10` The price of the plan per month in US dollars. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. `sso_url` string optional Example: `https://example.com/sso` The Single Sign-On URL for the resource, if applicable. `state` string (enum) required Example: `provisioned` The state the resource is currently in. `uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the addon resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resources": [ { "app_name": "Example App", "app_slug": "example_app", "has_config": true, "message": "Resource is provisioned successfully.", "metadata": [], "name": "my-resource-01", "plan_name": "Basic Plan", "plan_price_per_month": 10, "plan_slug": "basic_plan", "sso_url": "https://example.com/sso", "state": "provisioned", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create/Provision a New Add-on Resource `/v2/add-ons/saas` To create an add-on resource, send a POST request to `/v2/add-ons/saas` with required parameters. Some add-ons require additional metadata to be provided in the request body. To find out what metadata is required for a specific add-on, send a GET request to `/v2/add-ons/apps/{app_slug}/metadata`. #### Request Body: `application/json` `app_slug` string required Example: `example-app` The slug identifier for the application associated with the resource. `fleet_uuid` string optional Example: `f1234567-89ab-cdef-0123-456789abcdef01` UUID of the fleet/project to which this resource will belong. `linked_droplet_id` integer optional Example: `12345678` ID of the droplet to be linked to this resource, if applicable. `metadata` array of object required Metadata associated with the resource, set by the user. Metadata expected varies per app, and can be verified with a GET request to "/v2/add-ons/apps/{app_slug}/metadata" **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. ##### Request: `/v2/add-ons/saas` ### Payload Content type `application/json` ```json { "app_slug": "example-app", "fleet_uuid": "f1234567-89ab-cdef-0123-456789abcdef01", "linked_droplet_id": 12345678, "metadata": [ { "name": "property_name", "value": "example_value" } ], "name": "my-resource-01", "plan_slug": "basic_plan" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"my-addon-resource", "app_slug": "example-app", "plan_slug": "basic_plan", "metadata": [{"name": "company_name", "value": "Sample Company"}]}' \ "https://api.digitalocean.com/v2/add-ons/saas" ``` #### Responses **200** The response will be a JSON object with a key called resource. The value of this will be the resource created with the given. For additional details specific to the app, find and view its DigitalOcean Marketplace page. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional **Show child properties** `app_name` string optional Example: `Example App` The name of the application associated with the resource. `app_slug` string required Example: `example_app` The slug identifier for the application associated with the resource. `has_config` boolean required Example: `true` Indicates if the resource has configuration values set by the vendor. `message` string optional Example: `Resource is provisioned successfully.` A message related to the resource, if applicable. `metadata` array of object optional Metadata associated with the resource, set by the user. **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_name` string optional Example: `Basic Plan` The name of the plan associated with the resource. `plan_price_per_month` integer optional Example: `10` The price of the plan per month in US dollars. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. `sso_url` string optional Example: `https://example.com/sso` The Single Sign-On URL for the resource, if applicable. `state` string (enum) required Example: `provisioned` The state the resource is currently in. `uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the addon resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "app_name": "Example App", "app_slug": "example_app", "has_config": true, "message": "Resource is provisioned successfully.", "metadata": [], "name": "my-resource-01", "plan_name": "Basic Plan", "plan_price_per_month": 10, "plan_slug": "basic_plan", "sso_url": "https://example.com/sso", "state": "provisioned", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get details on an Add-On Resource `/v2/add-ons/saas/{resource_uuid}` To fetch details of a specific Add-On Resource, send a GET request to `/v2/add-ons/saas/{resource_uuid}`. Replace `{resource_uuid}` with the UUID of the resource you want to retrieve. #### Path Parameters `resource_uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The UUID of the add-on resource to retrieve. ##### Request: `/v2/add-ons/saas/{resource_uuid}` ### cURL ```bash curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/add-ons/saas/123e4567-e89b-12d3-a456-4266141" ``` #### Responses **200** The response will be a JSON object with a key called resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional **Show child properties** `app_name` string optional Example: `Example App` The name of the application associated with the resource. `app_slug` string required Example: `example_app` The slug identifier for the application associated with the resource. `has_config` boolean required Example: `true` Indicates if the resource has configuration values set by the vendor. `message` string optional Example: `Resource is provisioned successfully.` A message related to the resource, if applicable. `metadata` array of object optional Metadata associated with the resource, set by the user. **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_name` string optional Example: `Basic Plan` The name of the plan associated with the resource. `plan_price_per_month` integer optional Example: `10` The price of the plan per month in US dollars. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. `sso_url` string optional Example: `https://example.com/sso` The Single Sign-On URL for the resource, if applicable. `state` string (enum) required Example: `provisioned` The state the resource is currently in. `uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the addon resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "app_name": "Example App", "app_slug": "example_app", "has_config": true, "message": "Resource is provisioned successfully.", "metadata": [], "name": "my-resource-01", "plan_name": "Basic Plan", "plan_price_per_month": 10, "plan_slug": "basic_plan", "sso_url": "https://example.com/sso", "state": "provisioned", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update the name for an Add-On Resource `/v2/add-ons/saas/{resource_uuid}` To change the name of an Add-On Resource, send a PATCH request to `/v2/add-ons/saas/{resource_uuid}`. Replace `{resource_uuid}` with the UUID of the resource for which you want to change the name. #### Path Parameters `resource_uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The UUID of the add-on resource to rename. #### Request Body: `application/json` `name` string required Example: `new-name` The new name for the add-on resource. ##### Request: `/v2/add-ons/saas/{resource_uuid}` ### Payload Content type `application/json` ```json { "name": "new-name" } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"new-name"}' \ "https://api.digitalocean.com/v2/add-ons/saas/abc12345-6789-0123-4567-89abcdef0123" ``` #### Responses **200** The response will be a JSON object with a key called resource, representing the updated resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional **Show child properties** `app_name` string optional Example: `Example App` The name of the application associated with the resource. `app_slug` string required Example: `example_app` The slug identifier for the application associated with the resource. `has_config` boolean required Example: `true` Indicates if the resource has configuration values set by the vendor. `message` string optional Example: `Resource is provisioned successfully.` A message related to the resource, if applicable. `metadata` array of object optional Metadata associated with the resource, set by the user. **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_name` string optional Example: `Basic Plan` The name of the plan associated with the resource. `plan_price_per_month` integer optional Example: `10` The price of the plan per month in US dollars. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. `sso_url` string optional Example: `https://example.com/sso` The Single Sign-On URL for the resource, if applicable. `state` string (enum) required Example: `provisioned` The state the resource is currently in. `uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the addon resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "app_name": "Example App", "app_slug": "example_app", "has_config": true, "message": "Resource is provisioned successfully.", "metadata": [], "name": "my-resource-01", "plan_name": "Basic Plan", "plan_price_per_month": 10, "plan_slug": "basic_plan", "sso_url": "https://example.com/sso", "state": "provisioned", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete/Deprovision an Add-on Resource `/v2/add-ons/saas/{resource_uuid}` To delete an add-on resource, send a DELETE request to `/v2/add-ons/saas/{resource_uuid}` with the UUID of the resource to delete. You cannot retrieve the resource after it has been deleted. The response indicates a request was sent to the 3rd party add-on provider to delete the resource. You will no longer be billed for this resource. #### Path Parameters `resource_uuid` string (uuid) required Example: `4de7ac8b-495b-4884-9a69-1050c6793cd6` A unique identifier for the add-on resource. ##### Request: `/v2/add-ons/saas/{resource_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/add-ons/saas/123e4567-e89b-12d3-a456-426614174000" ``` #### Responses **200** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update the plan for an Add-On Resource `/v2/add-ons/saas/{resource_uuid}/plan` To change the plan associated with an Add-On Resource, send a PATCH request to `/v2/add-ons/saas/{resource_uuid}/plan`. Replace `{resource_uuid}` with the UUID of the resource for which you want to change the plan. #### Path Parameters `resource_uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The UUID of the add-on resource to update. #### Request Body: `application/json` `plan_slug` string required Example: `basic_plan` The slug identifier for the new plan to apply to the add-on resource. ##### Request: `/v2/add-ons/saas/{resource_uuid}/plan` ### Payload Content type `application/json` ```json { "plan_slug": "basic_plan" } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"plan_slug":"new-plan"}' \ "https://api.digitalocean.com/v2/add-ons/saas/abc12345-6789-0123-4567-89abcdef0123/plan" ``` #### Responses **200** The response will be a JSON object with a key called resource, representing the updated resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional **Show child properties** `app_name` string optional Example: `Example App` The name of the application associated with the resource. `app_slug` string required Example: `example_app` The slug identifier for the application associated with the resource. `has_config` boolean required Example: `true` Indicates if the resource has configuration values set by the vendor. `message` string optional Example: `Resource is provisioned successfully.` A message related to the resource, if applicable. `metadata` array of object optional Metadata associated with the resource, set by the user. **Show child properties** `name` string required Example: `property_name` The name of the metadata item to be set. `value` boolean | string required Example: `example_value` The value to be set for the metadata item, which can be a string or boolean. `name` string required Example: `my-resource-01` The name of the addon resource. `plan_name` string optional Example: `Basic Plan` The name of the plan associated with the resource. `plan_price_per_month` integer optional Example: `10` The price of the plan per month in US dollars. `plan_slug` string required Example: `basic_plan` The slug identifier for the plan associated with the resource. `sso_url` string optional Example: `https://example.com/sso` The Single Sign-On URL for the resource, if applicable. `state` string (enum) required Example: `provisioned` The state the resource is currently in. `uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the addon resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "app_name": "Example App", "app_slug": "example_app", "has_config": true, "message": "Resource is provisioned successfully.", "metadata": [], "name": "my-resource-01", "plan_name": "Basic Plan", "plan_price_per_month": 10, "plan_slug": "basic_plan", "sso_url": "https://example.com/sso", "state": "provisioned", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/agent-inference/ --- title: Agent Inference description: DigitalOcean Agent Platform allows you to create multi-agent workflows to power your AI applications. This allows developers to integrate agents into … product: Reference url: https://docs.digitalocean.com/reference/api/reference/agent-inference/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Agent Inference Generated on 4 Dec 2026 DigitalOcean Agent Platform allows you to create multi-agent workflows to power your AI applications. This allows developers to integrate agents into your AI applications. **Note:** The Agent Inference API uses a customer-specific base URL (the agent endpoint) and is independent of the main DigitalOcean control-plane API (`https://api.digitalocean.com`). Base URL `https://{your-agent-url}` ## Endpoints - **POST** [Create a model response for the given chat conversation](#agentInference_create_chat_completion) ## POST Create a model response for the given chat conversation `/api/v1/chat/completions` **Authorizations: inference_bearer_auth** Http: Bearer ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Authenticate with a Bearer Authorization Header **Serverless Inference:** ``` curl -X POST -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://inference.do-ai.run/v1/chat/completions" ``` **Agent Inference:** ``` curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true" ``` **Note:** Agent Inference APIs use an `agent_access_key` (endpoint access key) instead of a DigitalOcean OAuth token. The `agent_access_key` is provided when you provision an agent endpoint and is scoped to that specific agent. It is not interchangeable with DigitalOcean OAuth tokens (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`), which are used with Serverless Inference and the control-plane API at `https://api.digitalocean.com`. Creates a model response for the given chat conversation via a customer-provisioned agent endpoint. #### Query Parameters `agent` boolean required Example: `true` Must be set to true for agent-based completion behavior. Default: `true` #### Request Body: `application/json` `frequency_penalty` number optional Nullable Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. `logit_bias` object optional Nullable Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. `logprobs` boolean optional Nullable Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message. `max_completion_tokens` integer optional Nullable The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. `max_tokens` integer optional Nullable The maximum number of tokens that can be generated in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. `messages` array of object required A list of messages comprising the conversation so far. **Show child properties** `content` string optional Nullable Example: `Hello, how are you?` The contents of the message. `reasoning_content` string optional Nullable The reasoning content generated by the model (assistant messages only). `refusal` string optional Nullable The refusal message generated by the model (assistant messages only). `role` string, one of: system, developer, user, assistant, tool required Example: `user` The role of the message author. `tool_call_id` string optional Example: `call_abc123` Tool call that this message is responding to (tool messages only). `tool_calls` array of object optional The tool calls generated by the model (assistant messages only). **Show child properties** `function` object required **Show child properties** `arguments` string required Example: `{"location": "Boston"}` The arguments to call the function with, as generated by the model in JSON format. `name` string required Example: `get_weather` The name of the function to call. `id` string required Example: `call_abc123` The ID of the tool call. `type` string, one of: function required Example: `function` The type of the tool. Currently, only function is supported. `metadata` object optional Nullable Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. `model` string required Example: `llama3-8b-instruct` Model ID used to generate the response. `n` integer optional Nullable Example: `1` How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. `presence_penalty` number optional Nullable Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. `reasoning_effort` string (enum) optional Nullable Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. `seed` integer optional Nullable If specified, the system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed. `stop` array | string optional Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. `stream` boolean optional Nullable If set to true, the model response data will be streamed to the client as it is generated using server-sent events. `stream_options` object optional Nullable Options for streaming response. Only set this when you set stream to true. **Show child properties** `include_usage` boolean optional If set, an additional chunk will be streamed before the data \[DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. `temperature` number optional Nullable Example: `1` What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. `tool_choice` string, one of: none, auto, required | object optional Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {"type": "function", "function": {"name": "my_function"}} forces the model to call that tool. none is the default when no tools are present. auto is the default if tools are present. **Show child properties** `function` object required **Show child properties** `name` string required Example: `get_weather` The name of the function to call. `type` string, one of: function required Example: `function` `tools` array of object optional A list of tools the model may call. Currently, only functions are supported as a tool. **Show child properties** `function` object required **Show child properties** `description` string optional Example: `Get the current weather for a location.` A description of what the function does, used by the model to choose when and how to call the function. `name` string required Example: `get_weather` The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. `parameters` object optional The parameters the function accepts, described as a JSON Schema object. `type` string, one of: function required Example: `function` The type of the tool. Currently, only function is supported. `top_logprobs` integer optional Nullable An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used. `top_p` number optional Nullable Example: `1` An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or temperature but not both. `user` string optional Example: `user-1234` A unique identifier representing your end-user, which can help DigitalOcean to monitor and detect abuse. ##### Request: `/api/v1/chat/completions` ### Payload Content type `application/json` ```json { "frequency_penalty": 0, "logprobs": false, "max_completion_tokens": 0, "max_tokens": 0, "messages": [ { "content": "Hello, how are you?", "reasoning_content": "string", "refusal": "string", "role": "user", "tool_call_id": "call_abc123", "tool_calls": [] } ], "model": "llama3-8b-instruct", "n": 1, "presence_penalty": 0, "reasoning_effort": "none", "seed": 0, "stop": "string", "stream": false, "stream_options": { "include_usage": true }, "temperature": 1, "tool_choice": "none", "tools": [ { "type": "function" } ], "top_logprobs": 0, "top_p": 1, "user": "user-1234" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $AGENT_ACCESS_KEY" \ -d '{"messages": [{"role": "user", "content": "What is the capital of Portugal?"}], "model": "ignored"}' \ "https://$AGENT_URL/api/v1/chat/completions?agent=true" ``` ### Python ```python import os from pydo import Client client = Client( token=os.environ.get("AGENT_ACCESS_KEY"), agent_endpoint=os.environ.get("AGENT_ENDPOINT"), ) resp = client.agent.chat.completions.create( model="llama3.3-70b-instruct", messages=[ {"role": "user", "content": "What is the capital of Portugal?"}, ], ) print(resp.choices[0].message.content) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { agent, err := godo.NewAgentInferenceClient( os.Getenv("AGENT_ENDPOINT"), os.Getenv("AGENT_ACCESS_KEY"), ) if err != nil { panic(err) } ctx := context.Background() completion, _, err := agent.Chat.Completions.New(ctx, &godo.ChatCompletionNewParams{ Model: "llama3.3-70b-instruct", Messages: []godo.ChatCompletionMessage{ godo.UserMessage("What is the capital of Portugal?"), }, }) if err != nil { panic(err) } if msg := completion.Choices[0].Message.Content; msg != nil { fmt.Println(msg.Text()) } } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.AGENT_ACCESS_KEY, baseURL: `https://${process.env.AGENT_URL}/api`, }); const completion = await client.chat.completions.create({ model: "llama3.3-70b-instruct", messages: [ { role: "user", content: "What is the capital of Portugal?" }, ], }); console.log(completion.choices[0].message.content); ``` #### Responses **200** Successful chat completion. When stream is true, response is sent as Server-Sent Events (text/event-stream); otherwise a single JSON object (application/json) is returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `choices` array of object required A list of chat completion choices. Can be more than one if n is greater than 1. **Show child properties** `finish_reason` string, one of: stop, length, tool_calls, content_filter required Example: `stop` The reason the model stopped generating tokens. stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, tool_calls if the model called a tool. `index` integer required Example: `0` The index of the choice in the list of choices. `logprobs` object required Nullable Log probability information for the choice. **Show child properties** `content` array of object required Nullable A list of message content tokens with log probability information. **Show child properties** `bytes` array of integer required Nullable A list of integers representing the UTF-8 bytes representation of the token. Can be null if there is no bytes representation for the token. `logprob` number required Example: `-1.2345` The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. `token` string required Example: `Hello` The token. `top_logprobs` array of object required List of the most likely tokens and their log probability, at this token position. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `refusal` array of object required Nullable A list of message refusal tokens with log probability information. **Show child properties** `bytes` array of integer required Nullable A list of integers representing the UTF-8 bytes representation of the token. Can be null if there is no bytes representation for the token. `logprob` number required Example: `-1.2345` The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. `token` string required Example: `Hello` The token. `top_logprobs` array of object required List of the most likely tokens and their log probability, at this token position. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `message` object required A chat completion message generated by the model. **Show child properties** `content` string required Nullable Example: `Hello! How can I help you today?` The contents of the message. `reasoning_content` string required Nullable The reasoning content generated by the model. `refusal` string required Nullable The refusal message generated by the model. `role` string, one of: assistant required Example: `assistant` The role of the author of this message. `tool_calls` array of object optional The tool calls generated by the model, such as function calls. **Show child properties** `function` object required *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string required Example: `call_abc123` The ID of the tool call. `type` string, one of: function required Example: `function` The type of the tool. `created` integer required Example: `1677649420` The Unix timestamp (in seconds) of when the chat completion was created. `id` string required Example: `chatcmpl-abc123` A unique identifier for the chat completion. `model` string required Example: `llama3-8b-instruct` The model used for the chat completion. `object` string, one of: chat.completion required Example: `chat.completion` The object type, which is always chat.completion. `usage` object optional Usage statistics for the completion request. **Show child properties** `cache_created_input_tokens` integer required Example: `0` Number of prompt tokens written to cache. `cache_creation` object required Breakdown of prompt tokens written to cache. **Show child properties** `ephemeral_1h_input_tokens` integer required Example: `0` Number of prompt tokens written to 1h cache. `ephemeral_5m_input_tokens` integer required Example: `0` Number of prompt tokens written to 5m cache. `cache_read_input_tokens` integer required Example: `0` Number of prompt tokens read from cache. `completion_tokens` integer required Example: `20` Number of tokens in the generated completion. `prompt_tokens` integer required Example: `10` Number of tokens in the prompt. `total_tokens` integer required Example: `30` Total number of tokens used in the request (prompt + completion). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "choices": [ { "finish_reason": "stop", "index": 0 } ], "created": 1677649420, "id": "chatcmpl-abc123", "model": "llama3-8b-instruct", "object": "chat.completion", "usage": { "cache_created_input_tokens": 0, "cache_creation": { "ephemeral_1h_input_tokens": 0, "ephemeral_5m_input_tokens": 0 }, "cache_read_input_tokens": 0, "completion_tokens": 20, "prompt_tokens": 10, "total_tokens": 30 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Inference Pricing](https://docs.digitalocean.com/products/inference/details/pricing/index.html.md), [Supported Models on DigitalOcean Inference](https://docs.digitalocean.com/products/inference/details/models/index.html.md), [Use Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/agent-platform-api/ --- title: Agent Platform API description: The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge … product: Reference url: https://docs.digitalocean.com/reference/api/reference/agent-platform-api/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Agent Platform API Generated on 4 Dec 2026 The API lets you build GPU-powered AI agents with pre-built or custom foundation models, function and agent routes, and RAG pipelines with knowledge bases. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List Agents](#genai_list_agents) - **POST** [Create an Agent](#genai_create_agent) - **GET** [List Agent API Keys](#genai_list_agent_api_keys) - **POST** [Create an Agent API Key](#genai_create_agent_api_key) - **PUT** [Update API Key for an Agent](#genai_update_agent_api_key) - **DELETE** [Delete API Key for an Agent](#genai_delete_agent_api_key) - **PUT** [Regenerate API Key for an Agent](#genai_regenerate_agent_api_key) - **POST** [Add Function Route to an Agent](#genai_attach_agent_function) - **PUT** [Update Function Route for an Agent](#genai_update_agent_function) - **DELETE** [Delete Function Route for an Agent](#genai_detach_agent_function) - **POST** [Attach Guardrails to an Agent](#genai_attach_agent_guardrails) - **DELETE** [Detach a Guardrail from an Agent](#genai_detach_agent_guardrail) - **POST** [Attach Knowledge Bases to an Agent](#genai_attach_knowledge_bases) - **POST** [Attach Knowledge Base to an Agent](#genai_attach_knowledge_base) - **DELETE** [Detach Knowledge Base from an Agent](#genai_detach_knowledge_base) - **POST** [Add Agent Route to an Agent](#genai_attach_agent) - **PUT** [Update Agent Route for an Agent](#genai_update_attached_agent) - **DELETE** [Delete Agent Route for an Agent](#genai_detach_agent) - **GET** [Retrieve an Existing Agent](#genai_get_agent) - **PUT** [Update an Agent](#genai_update_agent) - **DELETE** [Delete an Agent](#genai_delete_agent) - **GET** [View Agent Routes](#genai_get_agent_children) - **PUT** [Update Agent Status](#genai_update_agent_deployment_visibility) - **GET** [Get Agent Usage](#genai_get_agent_usage) - **GET** [List Agent Versions](#genai_list_agent_versions) - **PUT** [Rollback to Agent Version](#genai_rollback_to_agent_version) - **GET** [List Anthropic API Keys](#genai_list_anthropic_api_keys) - **POST** [Create Anthropic API Key](#genai_create_anthropic_api_key) - **GET** [Get Anthropic API Key](#genai_get_anthropic_api_key) - **PUT** [Update Anthropic API Key](#genai_update_anthropic_api_key) - **DELETE** [Delete Anthropic API Key](#genai_delete_anthropic_api_key) - **GET** [List agents by Anthropic key](#genai_list_agents_by_anthropic_key) - **GET** [List Custom Models](#genai_list_custom_models) - **POST** [Import Custom Model](#genai_import_custom_model) - **GET** [Get Custom Model](#genai_get_custom_model) - **DELETE** [Delete Custom Model](#genai_delete_custom_model) - **PATCH** [Update Custom Model Metadata](#genai_update_custom_model_metadata) - **GET** [List Evaluation Datasets](#genai_list_evaluation_datasets) - **POST** [Create Evaluation Dataset](#genai_create_evaluation_dataset) - **POST** [Create Presigned URLs for Evaluation Dataset File Upload](#genai_create_evaluation_dataset_file_upload_presigned_urls) - **DELETE** [Delete Evaluation Dataset](#genai_delete_evaluation_dataset) - **GET** [Get Download URL for Evaluation Dataset](#genai_get_evaluation_dataset_download_url) - **GET** [List Evaluation Metrics](#genai_list_evaluation_metrics) - **POST** [Create Custom Evaluation Metric](#genai_create_custom_evaluation_metric) - **PUT** [Update Custom Evaluation Metric](#genai_update_custom_evaluation_metric) - **DELETE** [Delete Custom Evaluation Metric](#genai_delete_custom_evaluation_metric) - **POST** [Run an Evaluation Test Case](#genai_run_evaluation_test_case) - **GET** [Retrieve Information About an Existing Evaluation Run](#genai_get_evaluation_run) - **GET** [Retrieve Results of an Evaluation Run](#genai_get_evaluation_run_results) - **GET** [Retrieve Results of an Evaluation Run Prompt](#genai_get_evaluation_run_prompt_results) - **GET** [List Evaluation Test Cases](#genai_list_evaluation_test_cases) - **POST** [Create Evaluation Test Case.](#genai_create_evaluation_test_case) - **GET** [List Evaluation Runs by Test Case](#genai_list_evaluation_runs_by_test_case) - **GET** [Retrieve Information About an Existing Evaluation Test Case](#genai_get_evaluation_test_case) - **PUT** [Update an Evaluation Test Case.](#genai_update_evaluation_test_case) - **GET** [List Indexing Jobs for a Knowledge Base](#genai_list_indexing_jobs) - **POST** [Start Indexing Job for a Knowledge Base](#genai_create_indexing_job) - **GET** [List Data Sources for Indexing Job for a Knowledge Base](#genai_list_indexing_job_data_sources) - **GET** [Get Signed URL for Indexing Job Details](#genai_get_indexing_job_details_signed_url) - **GET** [Retrieve Status of Indexing Job for a Knowledge Base](#genai_get_indexing_job) - **PUT** [Cancel Indexing Job for a Knowledge Base](#genai_cancel_indexing_job) - **GET** [List Knowledge Bases](#genai_list_knowledge_bases) - **POST** [Create a Knowledge Base](#genai_create_knowledge_base) - **POST** [Create Presigned URLs for Data Source File Upload](#genai_create_data_source_file_upload_presigned_urls) - **GET** [List Data Sources for a Knowledge Base](#genai_list_knowledge_base_data_sources) - **POST** [Add Data Source to a Knowledge Base](#genai_create_knowledge_base_data_source) - **PUT** [Update Data Source options](#genai_update_knowledge_base_data_source) - **DELETE** [Delete a Data Source from a Knowledge Base](#genai_delete_knowledge_base_data_source) - **GET** [List Indexing Jobs for a Knowledge Base](#genai_list_indexing_jobs_by_knowledge_base) - **GET** [Retrieve Information About an Existing Knowledge Base](#genai_get_knowledge_base) - **PUT** [Update a Knowledge Base](#genai_update_knowledge_base) - **DELETE** [Delete a Knowledge Base](#genai_delete_knowledge_base) - **POST** [Create Presigned URLs for Model Evaluation Dataset File Upload](#genai_create_model_eval_dataset_upload_presigned_urls) - **GET** [List Model Evaluation Metrics](#genai_list_model_evaluation_metrics) - **GET** [List Model Evaluation Presets](#genai_list_model_evaluation_presets) - **GET** [Retrieve Model Evaluation Preset](#genai_get_model_evaluation_preset) - **DELETE** [Delete Model Evaluation Preset](#genai_delete_model_evaluation_preset) - **GET** [List Model Evaluation Runs](#genai_list_model_evaluation_runs) - **POST** [Create Model Evaluation Run](#genai_create_model_evaluation_run) - **GET** [Retrieve Model Evaluation Run](#genai_get_model_evaluation_run) - **PATCH** [Update Model Evaluation Run](#genai_update_model_evaluation_run) - **DELETE** [Delete Model Evaluation Run](#genai_delete_model_evaluation_run) - **PUT** [Cancel Model Evaluation Run](#genai_cancel_model_evaluation_run) - **GET** [Get Download URL for Model Evaluation Run Results](#genai_get_model_evaluation_run_results_download_url) - **GET** [List Available Models](#genai_list_models) - **GET** [List Model API Keys](#genai_list_model_api_keys) - **POST** [Create a Model API Key](#genai_create_model_api_key) - **PUT** [Update API Key for a Model](#genai_update_model_api_key) - **DELETE** [Delete API Key for a Model](#genai_delete_model_api_key) - **PUT** [Regenerate API Key for a Model](#genai_regenerate_model_api_key) - **GET** [List Model Catalog](#genai_list_model_catalog) - **GET** [Get Model Catalog Card](#genai_get_model_catalog_card) - **GET** [List Model Catalog V2](#genai_list_model_catalog_v2) - **GET** [Get Model Catalog Card V2](#genai_get_model_catalog_card_v2) - **GET** [List Model Routers](#genai_list_model_routers) - **POST** [Create a Model Router](#genai_create_model_router) - **GET** [List Model Router Presets](#genai_list_model_router_presets) - **GET** [List Model Router Task Presets](#genai_list_model_router_task_presets) - **GET** [Retrieve an Existing Model Router](#genai_get_model_router) - **PUT** [Update a Model Router](#genai_update_model_router) - **DELETE** [Delete a Model Router](#genai_delete_model_router) - **POST** [Get Oauth2 Dropbox Tokens](#genai_create_oauth2_dropbox_tokens) - **GET** [Get Oauth2 URL](#genai_get_oauth2_url) - **GET** [List OpenAI API Keys](#genai_list_openai_api_keys) - **POST** [Create OpenAI API Key](#genai_create_openai_api_key) - **GET** [Get OpenAI API Key](#genai_get_openai_api_key) - **PUT** [Update OpenAI API Key](#genai_update_openai_api_key) - **DELETE** [Delete OpenAI API Key](#genai_delete_openai_api_key) - **GET** [List agents by OpenAI key](#genai_list_agents_by_openai_key) - **GET** [List Datacenter Regions](#genai_list_datacenter_regions) - **GET** [List Common Scenario & Goal Library](#genai_list_scenario_library) - **POST** [Create Scenario Set From Library](#genai_create_scenario_set_from_library) - **GET** [List Scenarios In Library Entry](#genai_list_scenario_library_scenarios) - **GET** [List Scenario Sets](#genai_list_scenario_sets) - **POST** [Create Scenario Set](#genai_create_scenario_set) - **POST** [Create Presigned URLs for Scenario Set File Upload](#genai_create_scenario_set_upload_presigned_urls) - **POST** [Generate Scenario Set](#genai_create_generated_scenario_set) - **GET** [Retrieve Scenario Set](#genai_get_scenario_set) - **PUT** [Update Scenario Set](#genai_update_scenario_set) - **DELETE** [Delete Scenario Set](#genai_delete_scenario_set) - **GET** [Retrieve Scenario Set Download URL](#genai_get_scenario_set_download_url) - **POST** [Duplicate Scenario Set](#genai_create_duplicate_scenario_set) - **GET** [List Scenarios](#genai_list_scenarios) - **POST** [Create scheduled indexing for knowledge base](#genai_create_scheduled_indexing) - **GET** [Get Scheduled Indexing for Knowledge Base](#genai_get_scheduled_indexing) - **DELETE** [Delete Scheduled Indexing](#genai_delete_scheduled_indexing) - **GET** [List Simulation Runs](#genai_list_simulation_runs) - **POST** [Create Simulation Run](#genai_create_simulation_run) - **GET** [Retrieve Simulation Run](#genai_get_simulation_run) - **PUT** [Update Simulation Run](#genai_update_simulation_run) - **DELETE** [Delete Simulation Run](#genai_delete_simulation_run) - **PATCH** [Cancel Simulation Run](#genai_patch_cancel_simulation_run) - **GET** [List Simulation Episodes](#genai_list_simulation_episodes) - **GET** [Retrieve Simulation Episode](#genai_get_simulation_episode) - **GET** [Retrieve Episode Trajectory](#genai_get_simulation_episode_trajectory) - **GET** [Retrieve Episode Trajectory Download URL](#genai_get_simulation_episode_trajectory_url) - **GET** [List Workspaces](#genai_list_workspaces) - **POST** [Create a Workspace](#genai_create_workspace) - **GET** [Retrieve an Existing Workspace](#genai_get_workspace) - **PUT** [Update a Workspace](#genai_update_workspace) - **DELETE** [Delete a Workspace](#genai_delete_workspace) - **GET** [List agents by Workspace](#genai_list_agents_by_workspace) - **PUT** [Move Agents to a Workspace](#genai_update_agents_workspace) - **GET** [List Evaluation Test Cases by Workspace](#genai_list_evaluation_test_cases_by_workspace) ## GET List Agents `/v2/gen-ai/agents` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: genai:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all agents, send a GET request to `/v2/gen-ai/agents`. #### Query Parameters `only_deployed` boolean optional Example: `true` Only list agents that are deployed. `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/agents` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agents` array of object optional Agents **Show child properties** `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `This is a chatbot that can help you with your questions.` Description of agent `if_case` string optional Example: `if talking about the weather use this route` Instructions to the agent on how to use the route `instruction` string optional Example: `Hello, how can I help you?` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `5` How many results should be considered from an attached knowledge base `max_tokens` integer (int64) optional Example: `100` Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response. `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `My Agent` Agent name `project_id` string optional Example: `12345678-1234-1234-1234-123456789012` The DigitalOcean project ID associated with the agent `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `"low"` The reasoning effort for the agent `region` string optional Example: `"tor1"` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345678` Id of user that created the route `route_name` string optional Example: `Route Name` Route name `route_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Route uuid `tags` array of string optional Example: `["example string"]` A set of abitrary tags to organize your agent `temperature` number (float) optional Example: `0.5` Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation. `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `1000` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `0.9` Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses. `updated_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` Last modified `url` string optional Example: `https://example.com/agent` Access your agent under this url `user_id` string (uint64) optional Example: `12345678` Id of user that created the agent `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool to retrieve content from public web pages. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool to search the public web for current information. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agents": [ { "chatbot_identifiers": [], "created_at": "2021-01-01T00:00:00Z", "description": "This is a chatbot that can help you with your questions.", "if_case": "if talking about the weather use this route", "instruction": "Hello, how can I help you?", "k": 5, "max_tokens": 100, "mcp_servers": [], "name": "My Agent", "project_id": "12345678-1234-1234-1234-123456789012", "provide_citations": true, "reasoning_effort": "\"low\"", "region": "\"tor1\"", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2021-01-01T00:00:00Z", "route_created_by": "12345678", "route_name": "Route Name", "route_uuid": "\"12345678-1234-1234-1234-123456789012\"", "tags": [ "example string" ], "temperature": 0.5, "thinking_token_budget": 1000, "top_p": 0.9, "updated_at": "2021-01-01T00:00:00Z", "url": "https://example.com/agent", "user_id": "12345678", "uuid": "\"12345678-1234-1234-1234-123456789012\"", "version_hash": "example string", "web_fetch_enabled": true, "web_search_enabled": true } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Agent `/v2/gen-ai/agents` To create a new agent, send a POST request to `/v2/gen-ai/agents`. The response body contains a JSON object with the newly created agent object. #### Request Body: `application/json` `anthropic_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Optional Anthropic API key ID to use with Anthropic models `description` string optional Example: `"My Agent Description"` A text description of the agent, not used in inference `instruction` string optional Example: `"You are an agent who thinks deeply about the world"` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `knowledge_base_uuid` array of string optional Example: `["example string"]` Ids of the knowledge base(s) to attach to the agent `mcp_servers` array of object optional MCP (Model Context Protocol) servers to attach to the agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model_provider_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `model_router_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `model_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Identifier for the foundation model. `name` string optional Example: `"My Agent"` Agent name `open_ai_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Optional OpenAI API key ID to use with OpenAI models `project_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` The id of the DigitalOcean project this agent will belong to `reasoning_effort` string optional Example: `"low"` `region` string optional Example: `"tor1"` The DigitalOcean region to deploy your agent in `router_preset_slug` string optional Example: `"general"` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `thinking_token_budget` integer (int64) optional Example: `123` `web_fetch_enabled` boolean optional Example: `true` Whether the agent can use the built-in web_fetch tool to retrieve content from public web pages. `web_search_enabled` boolean optional Example: `true` Whether the agent can use the built-in web_search tool to search the public web for current information. `workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the workspace ##### Request: `/v2/gen-ai/agents` ### Payload Content type `application/json` ```json { "anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "description": "\"My Agent Description\"", "instruction": "\"You are an agent who thinks deeply about the world\"", "knowledge_base_uuid": [ "example string" ], "mcp_servers": [ { "allowed_tools": [ "example string" ], "authorization": "example string", "server_label": "example string", "server_url": "example string" } ], "model_provider_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "model_router_uuid": "\"12345678-1234-1234-1234-123456789012\"", "model_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"My Agent\"", "open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "project_id": "\"12345678-1234-1234-1234-123456789012\"", "reasoning_effort": "\"low\"", "region": "\"tor1\"", "router_preset_slug": "\"general\"", "tags": [ "example string" ], "thinking_token_budget": 123, "web_fetch_enabled": true, "web_search_enabled": true, "workspace_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents" \ -d '{ "name": "api-create", "model_uuid": "95ea6652-75ed-11ef-bf8f-4e013e2ddde4", "instruction": "be a weather reporter", "description": "weather-agent", "project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e", "tags": [ "tag1" ], "region": "tor1", "knowledge_base_uuid": [ "9758a232-b351-11ef-bf8f-4e013e2ddde4" ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Agent API Keys `/v2/gen-ai/agents/{agent_uuid}/api_keys` To list all agent API keys, send a GET request to `/v2/gen-ai/agents/{agent_uuid}/api_keys`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/api_keys` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/api_keys" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_infos": [ { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Agent API Key `/v2/gen-ai/agents/{agent_uuid}/api_keys` To create an agent API key, send a POST request to `/v2/gen-ai/agents/{agent_uuid}/api_keys`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id #### Request Body: `application/json` `agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Agent id `name` string optional Example: `Production Key` A human friendly name to identify the key ##### Request: `/v2/gen-ai/agents/{agent_uuid}/api_keys` ### Payload Content type `application/json` ```json { "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "Production Key" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "name": "test-key" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Agent API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update API Key for an Agent `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}` To update an agent API key, send a PUT request to `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID #### Request Body: `application/json` `agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Agent id `api_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` API key ID `name` string optional Example: `"Production Key"` Name ##### Request: `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}` ### Payload Content type `application/json` ```json { "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4", "name": "test-key2" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Agent API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete API Key for an Agent `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}` To delete an API key for an agent, send a DELETE request to `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for your agent. `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key for an agent. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Agent API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Regenerate API Key for an Agent `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate` To regenerate an agent API key, send a PUT request to `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/agents/{agent_uuid}/api_keys/{api_key_uuid}/regenerate` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/api_keys/11efcf7e-824d-2808-bf8f-4e013e2ddde4/regenerate" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Agent API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Function Route to an Agent `/v2/gen-ai/agents/{agent_uuid}/functions` To create a function route for an agent, send a POST request to `/v2/gen-ai/agents/{agent_uuid}/functions`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id #### Request Body: `application/json` `agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Agent id `description` string optional Example: `"My Function Description"` Function description `faas_name` string optional Example: `"my-function"` The name of the function in the DigitalOcean functions platform `faas_namespace` string optional Example: `"default"` The namespace of the function in the DigitalOcean functions platform `function_name` string optional Example: `"My Function"` Function name `input_schema` object optional Describe the input schema for the function so the agent may call it `output_schema` object optional Describe the output schema for the function so the agent handle its response ##### Request: `/v2/gen-ai/agents/{agent_uuid}/functions` ### Payload Content type `application/json` ```json { "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "description": "\"My Function Description\"", "faas_name": "\"my-function\"", "faas_namespace": "\"default\"", "function_name": "\"My Function\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/functions" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "function_name": "funzip", "description": "Use when you need the zipcode for a city", "input_schema": { "city": { "description": "the city you want a zipcode for", "required": true, "type": "string" } }, "output_schema": { "zip_code": { "description": "The zipcode of the desired city", "type": "number" } }, "faas_namespace": "fn-2014dc98-faa1-45f4-ba1f-59910cb3d399", "faas_name": "default/get-zipcode" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Function Route for an Agent `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}` To update the function route, send a PUT request to `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id `function_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Function id #### Request Body: `application/json` `agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Agent id `description` string optional Example: `"My Function Description"` Funciton description `faas_name` string optional Example: `"my-function"` The name of the function in the DigitalOcean functions platform `faas_namespace` string optional Example: `"default"` The namespace of the function in the DigitalOcean functions platform `function_name` string optional Example: `"My Function"` Function name `function_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Function id `input_schema` object optional Describe the input schema for the function so the agent may call it `output_schema` object optional Describe the output schema for the function so the agent handle its response ##### Request: `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}` ### Payload Content type `application/json` ```json { "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "description": "\"My Function Description\"", "faas_name": "\"my-function\"", "faas_namespace": "\"default\"", "function_name": "\"My Function\"", "function_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/functions/b00e74f6-985c-11ef-bf8f-4e013e2ddde4" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "function_uuid": "6cc5cda5-9ac3-11ef-bf8f-4e013e2ddde4", "function_name": "func-rename" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Function Route for an Agent `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}` To delete a function route from an agent, send a DELETE request to `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The id of the agent the function route belongs to. `function_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The function route to be destroyed. This does not destroy the function itself. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/functions/{function_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/ff47f5b7-96e5-11ef-bf8f-4e013e2ddde4/functions/6cc5cda5-9ac3-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Attach Guardrails to an Agent `/v2/gen-ai/agents/{agent_uuid}/guardrails` To attach guardrails to an agent, send a POST request to `/v2/gen-ai/agents/{agent_uuid}/guardrails`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The UUID of the agent. #### Request Body: `application/json` `agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` The UUID of the agent. `guardrails` array of object optional The list of guardrails to attach. **Show child properties** `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Guardrail uuid `priority` integer (int64) optional Example: `123` Priority of the guardrail ##### Request: `/v2/gen-ai/agents/{agent_uuid}/guardrails` ### Payload Content type `application/json` ```json { "agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "guardrails": [ { "guardrail_uuid": "123e4567-e89b-12d3-a456-426614174000", "priority": 123 } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1c8be326-00fe-11f1-b542-ca68c578b05c/guardrails" \ -d '{ "guardrails": [ { "guardrail_uuid": "69bcc61c-2bb2-49fd-b6ed-7c1bd73d6442", "priority": 1 }, { "guardrail_uuid": "dc72b12b-bd45-46c9-bca1-00a6624aac3a", "priority": 2 } ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Detach a Guardrail from an Agent `/v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}` To detach a guardrail from an agent, send a DELETE request to `/v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The UUID of the agent. `guardrail_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The UUID of the guardrail to detach. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/guardrails/{guardrail_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1c8be326-00fe-11f1-b542-ca68c578b04c/guardrails/69bcc61c-2bb2-49fd-b6ed-7c1bd73d6572" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Attach Knowledge Bases to an Agent `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases` To attach knowledge bases to an agent, send a POST request to `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases` #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for an agent. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/knowledge_bases" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "knowledge_base_uuids": [ "9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4", "683c3100-7c18-4c94-aea4-5ac5875cc87c", "4887a78b-74af-46b3-98f4-451a48f9cc5e" ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Attach Knowledge Base to an Agent `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}` To attach a knowledge base to an agent, send a POST request to `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}` #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for an agent. `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for a knowledge base. ##### Request: `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4" \ -d '{ "agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "agent_uuid": "9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Detach Knowledge Base from an Agent `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}` To detach a knowledge base from an agent, send a DELETE request to `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}`. #### Path Parameters `agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id ##### Request: `/v2/gen-ai/agents/{agent_uuid}/knowledge_bases/{knowledge_base_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Agent Route to an Agent `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` To add an agent route to an agent, send a POST request to `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}`. #### Path Parameters `parent_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for the parent agent. `child_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Routed agent id #### Request Body: `application/json` `child_agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Routed agent id `if_case` string optional Example: `"use this to get weather information"` `parent_agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` A unique identifier for the parent agent. `route_name` string optional Example: `"weather_route"` Name of route ##### Request: `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` ### Payload Content type `application/json` ```json { "child_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "if_case": "\"use this to get weather information\"", "parent_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "route_name": "\"weather_route\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/child_agents/6a09d603-b68d-11ef-bf8f-4e013e2ddde4" \ -d '{ "parent_agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "child_agent_uuid": "6a09d603-b68d-11ef-bf8f-4e013e2ddde4", "route_name": "route-token-stat", "if_case": "for any token related statistics, use this route" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `child_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Routed agent id `parent_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` A unique identifier for the parent agent. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Agent Route for an Agent `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` To update an agent route for an agent, send a PUT request to `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}`. #### Path Parameters `parent_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for the parent agent. `child_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Routed agent id #### Request Body: `application/json` `child_agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Routed agent id `if_case` string optional Example: `"use this to get weather information"` Describes the case in which the child agent should be used `parent_agent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` A unique identifier for the parent agent. `route_name` string optional Example: `"weather_route"` Route name `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique id of linkage ##### Request: `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` ### Payload Content type `application/json` ```json { "child_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "if_case": "\"use this to get weather information\"", "parent_agent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "route_name": "\"weather_route\"", "uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/child_agents/18c4c90c-cc40-11ef-bf8f-4e013e2ddde4" \ -d '{ "parent_agent_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "child_agent_uuid": "18c4c90c-cc40-11ef-bf8f-4e013e2ddde4", "route_name": "route-rename-api", "if_case": "if any token related statistics, use this route only", "uuid":"a22d2004-bbaa-11ef-bf8f-4e013e2ddde4" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `child_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Routed agent id `parent_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` A unique identifier for the parent agent. `rollback` boolean optional Example: `true` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of linkage **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "rollback": true, "uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Agent Route for an Agent `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` To delete an agent route from a parent agent, send a DELETE request to `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}`. #### Path Parameters `parent_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Pagent agent id `child_agent_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Routed agent id ##### Request: `/v2/gen-ai/agents/{parent_agent_uuid}/child_agents/{child_agent_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/ff47f5b7-96e5-11ef-bf8f-4e013e2ddde4/child_agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `child_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Routed agent id `parent_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Pagent agent id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "child_agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "parent_agent_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Agent `/v2/gen-ai/agents/{uuid}` To retrieve details of an agent, GET request to `/v2/gen-ai/agents/{uuid}`. The response body is a JSON object containing the agent. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique agent id ##### Request: `/v2/gen-ai/agents/{uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update an Agent `/v2/gen-ai/agents/{uuid}` To update an agent, send a PUT request to `/v2/gen-ai/agents/{uuid}`. The response body is a JSON object containing the agent. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique agent id #### Request Body: `application/json` `agent_log_insights_enabled` boolean optional Example: `true` `allowed_domains` array of string optional Example: `["example string"]` Optional list of allowed domains for the chatbot - Must use fully qualified domain name (FQDN) such as [https://example.com](https://example.com) `anthropic_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Optional anthropic key uuid for use with anthropic models `clear_mcp_servers` boolean optional Example: `true` When true, removes all MCP servers from the agent. Use this instead of sending an empty mcp_servers array. `conversation_logs_enabled` boolean optional Example: `true` Optional update of conversation logs enabled `description` string optional Example: `"My Agent Description"` Agent description `instruction` string optional Example: `"You are an agent who thinks deeply about the world"` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `5` How many results should be considered from an attached knowledge base `max_tokens` integer (int64) optional Example: `100` Specifies the maximum number of tokens the model can process in a single input or output, set as a number between 1 and 512. This determines the length of each response. `mcp_servers` array of object optional MCP (Model Context Protocol) servers to attach to the agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model_provider_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Optional Model Provider uuid for use with provider models `model_router_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `model_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Identifier for the foundation model. `name` string optional Example: `"My New Agent Name"` Agent name `open_ai_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Optional OpenAI key uuid for use with OpenAI models `project_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` The id of the DigitalOcean project this agent will belong to `provide_citations` boolean optional Example: `true` `reasoning_effort` string optional Example: `"low"` `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `router_preset_slug` string optional Example: `"general"` `tags` array of string optional Example: `["example string"]` A set of abitrary tags to organize your agent `temperature` number (float) optional Example: `0.7` Controls the model’s creativity, specified as a number between 0 and 1. Lower values produce more predictable and conservative responses, while higher values encourage creativity and variation. `thinking_token_budget` integer (int64) optional Example: `123` `top_p` number (float) optional Example: `0.9` Defines the cumulative probability threshold for word selection, specified as a number between 0 and 1. Higher values allow for more diverse outputs, while lower values ensure focused and coherent responses. `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique agent id `web_fetch_enabled` boolean optional Example: `true` Optional. Set to true to let the agent use the built-in web_fetch tool to retrieve content from public web pages, or false to disable it. `web_search_enabled` boolean optional Example: `true` Optional. Set to true to let the agent use the built-in web_search tool to search the public web for current information, or false to disable it. ##### Request: `/v2/gen-ai/agents/{uuid}` ### Payload Content type `application/json` ```json { "agent_log_insights_enabled": true, "allowed_domains": [ "example string" ], "anthropic_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "clear_mcp_servers": true, "conversation_logs_enabled": true, "description": "\"My Agent Description\"", "instruction": "\"You are an agent who thinks deeply about the world\"", "k": 5, "max_tokens": 100, "mcp_servers": [ { "allowed_tools": [ "example string" ], "authorization": "example string", "server_label": "example string", "server_url": "example string" } ], "model_provider_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "model_router_uuid": "\"12345678-1234-1234-1234-123456789012\"", "model_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"My New Agent Name\"", "open_ai_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "project_id": "\"12345678-1234-1234-1234-123456789012\"", "provide_citations": true, "reasoning_effort": "\"low\"", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "router_preset_slug": "\"general\"", "tags": [ "example string" ], "temperature": 0.7, "thinking_token_budget": 123, "top_p": 0.9, "uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4" \ -d '{ "uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "name": "rename-agent-api", "instruction": "be a weather reporter and act like you are a pro", "description": "weather-agent2", "model_uuid": "95ea6652-75ed-11ef-bf8f-4e013e2ddde4", "project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e", "tags": [ "tag2" ], "k": 5, "temperature": 1, "top_p": 1, "max_tokens": 250 }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an Agent `/v2/gen-ai/agents/{uuid}` To delete an agent, send a DELETE request to `/v2/gen-ai/agents/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique agent id ##### Request: `/v2/gen-ai/agents/{uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agent/5581a586-a745-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET View Agent Routes `/v2/gen-ai/agents/{uuid}/child_agents` To view agent routes for an agent, send a GET requtest to `/v2/gen-ai/agents/{uuid}/child_agents`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id ##### Request: `/v2/gen-ai/agents/{uuid}/child_agents` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/child_agents" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `children` array of object optional Child agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "children": [ { "api_key_infos": [], "api_keys": [], "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "max_tokens": 123, "mcp_servers": [], "name": "example name", "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Agent Status `/v2/gen-ai/agents/{uuid}/deployment_visibility` Check whether an agent is public or private. To update the agent status, send a PUT request to `/v2/gen-ai/agents/{uuid}/deployment_visibility`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique id #### Request Body: `application/json` `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys ##### Request: `/v2/gen-ai/agents/{uuid}/deployment_visibility` ### Payload Content type `application/json` ```json { "uuid": "\"12345678-1234-1234-1234-123456789012\"", "visibility": "VISIBILITY_UNKNOWN" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/deployment_visibility" \ -d '{ "uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "visibility": "VISIBILITY_PUBLIC" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` object optional An Agent **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": { "anthropic_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "api_key_infos": [], "api_keys": [], "chatbot": { "allowed_domains": [ "example string" ], "button_background_color": "example string", "logo": "example string", "name": "example name", "primary_color": "example string", "secondary_color": "example string", "starting_message": "example string" }, "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "deployment": { "created_at": "2023-01-01T00:00:00Z", "name": "example name", "status": "STATUS_UNKNOWN", "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000", "visibility": "VISIBILITY_UNKNOWN" }, "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "logging_config": { "galileo_project_id": "123e4567-e89b-12d3-a456-426614174000", "galileo_project_name": "example name", "insights_enabled": true, "insights_enabled_at": "2023-01-01T00:00:00Z", "log_stream_id": "123e4567-e89b-12d3-a456-426614174000", "log_stream_name": "example name" }, "max_tokens": 123, "mcp_servers": [], "model": { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2023-01-01T00:00:00Z", "endpoints": [], "inference_name": "example name", "inference_version": "example string", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "example string", "name": "example name", "parameter_count": 123, "parent_uuid": "123e4567-e89b-12d3-a456-426614174000", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2023-01-01T00:00:00Z", "upload_complete": true, "url": "example string", "usecases": [ "MODEL_USECASE_AGENT", "MODEL_USECASE_GUARDRAIL" ], "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model_provider_key": { "api_key_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "updated_at": "2023-01-01T00:00:00Z" }, "model_router": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "openai_api_key": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "template": { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "guardrails": [], "instruction": "example string", "k": 123, "knowledge_bases": [], "long_description": "\"Enhance your customer service with an AI agent designed to provide consistent, helpful, and accurate support across multiple channels. This template creates an agent that can answer product questions, troubleshoot common issues, process simple requests, and maintain a friendly, on-brand voice throughout customer interactions. Reduce response times, handle routine inquiries efficiently, and ensure your customers feel heard and helped.\"", "max_tokens": 123, "name": "example name", "short_description": "\"This template has been designed with question-answer and conversational use cases in mind. It comes with validated agent instructions, fine-tuned model settings, and preconfigured guardrails defined for customer support-related use cases.\"", "summary": "example string", "tags": [ "example string" ], "temperature": 123, "template_type": "AGENT_TEMPLATE_TYPE_STANDARD", "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true, "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Agent Usage `/v2/gen-ai/agents/{uuid}/usage` To get agent usage, send a GET request to `/v2/gen-ai/agents/{uuid}/usage`. Returns usage metrics for the specified agent within the provided time range. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent id #### Query Parameters `start` string optional Example: `"example string"` Return all usage data from this date. `stop` string optional Example: `"example string"` Return all usage data up to this date, if omitted, will return up to the current date. ##### Request: `/v2/gen-ai/agents/{uuid}/usage` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/genai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/usage?start=2024-01-01T00:00:00Z&stop=2024-01-31T23:59:59Z" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `log_insights_usage` object optional Resource Usage Description **Show child properties** `measurements` array of object optional **Show child properties** `tokens` integer (int64) optional Example: `123` `usage_type` string optional Example: `example string` `resource_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `start` string (date-time) optional Example: `2023-01-01T00:00:00Z` `stop` string (date-time) optional Example: `2023-01-01T00:00:00Z` `usage` object optional Resource Usage Description **Show child properties** `measurements` array of object optional **Show child properties** `tokens` integer (int64) optional Example: `123` `usage_type` string optional Example: `example string` `resource_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `start` string (date-time) optional Example: `2023-01-01T00:00:00Z` `stop` string (date-time) optional Example: `2023-01-01T00:00:00Z` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "log_insights_usage": { "measurements": [], "resource_uuid": "123e4567-e89b-12d3-a456-426614174000", "start": "2023-01-01T00:00:00Z", "stop": "2023-01-01T00:00:00Z" }, "usage": { "measurements": [], "resource_uuid": "123e4567-e89b-12d3-a456-426614174000", "start": "2023-01-01T00:00:00Z", "stop": "2023-01-01T00:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Agent Versions `/v2/gen-ai/agents/{uuid}/versions` To list all agent versions, send a GET request to `/v2/gen-ai/agents/{uuid}/versions`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent uuid #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/agents/{uuid}/versions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/c441bf77-81d6-11ef-bf8f-4e013e2ddde4/versions" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent_versions` array of object optional Agents **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the agent this version belongs to `attached_child_agents` array of object optional List of child agent relationships **Show child properties** `agent_name` string optional Example: `example name` Name of the child agent `child_agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Child agent unique identifier `if_case` string optional Example: `example string` If case `is_deleted` boolean optional Example: `true` Child agent is deleted `route_name` string optional Example: `example name` Route name `attached_functions` array of object optional List of function versions **Show child properties** `description` string optional Example: `example string` Description of the function `faas_name` string optional Example: `example name` FaaS name of the function `faas_namespace` string optional Example: `example name` FaaS namespace of the function `is_deleted` boolean optional Example: `true` Whether the function is deleted `name` string optional Example: `example name` Name of the function `attached_guardrails` array of object optional List of guardrail version **Show child properties** `is_deleted` boolean optional Example: `true` Whether the guardrail is deleted `name` string optional Example: `example name` Guardrail Name `priority` integer (int64) optional Example: `123` Guardrail Priority `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Guardrail UUID `attached_knowledgebases` array of object optional List of knowledge base agent versions **Show child properties** `is_deleted` boolean optional Example: `true` Deletet at date / time `name` string optional Example: `example name` Name of the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the knowledge base `can_rollback` boolean optional Example: `true` Whether the version is able to be rolled back to `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by_email` string optional Example: `example@example.com` User who created this version `currently_applied` boolean optional Example: `true` Whether this is the currently applied configuration `description` string optional Example: `example string` Description of the agent `id` string (uint64) optional Example: `12345` Unique identifier `instruction` string optional Example: `example string` Instruction for the agent `k` integer (int64) optional Example: `123` K value for the agent's configuration `max_tokens` integer (int64) optional Example: `123` Max tokens setting for the agent `model_name` string optional Example: `example name` Name of model associated to the agent version `name` string optional Example: `example name` Name of the agent `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `tags` array of string optional Example: `["example string"]` Tags associated with the agent `temperature` number (float) optional Example: `123` Temperature setting for the agent `top_p` number (float) optional Example: `123` Top_p setting for the agent `trigger_action` string optional Example: `example string` Action triggering the configuration update `version_hash` string optional Example: `example string` Version hash `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent_versions": [ { "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "attached_child_agents": [], "attached_functions": [], "attached_guardrails": [], "attached_knowledgebases": [], "can_rollback": true, "created_at": "2023-01-01T00:00:00Z", "created_by_email": "example@example.com", "currently_applied": true, "description": "example string", "id": "12345", "instruction": "example string", "k": 123, "max_tokens": 123, "model_name": "example name", "name": "example name", "provide_citations": true, "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "tags": [ "example string" ], "temperature": 123, "top_p": 123, "trigger_action": "example string", "version_hash": "example string" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Rollback to Agent Version `/v2/gen-ai/agents/{uuid}/versions` To update to a specific agent version, send a PUT request to `/v2/gen-ai/agents/{uuid}/versions`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Agent unique identifier #### Request Body: `application/json` `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Agent unique identifier `version_hash` string optional Example: `c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73` Unique identifier ##### Request: `/v2/gen-ai/agents/{uuid}/versions` ### Payload Content type `application/json` ```json { "uuid": "\"12345678-1234-1234-1234-123456789012\"", "version_hash": "c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/agents/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/versions" \ -d '{ "uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "version_hash": "c3658d8b5c05494cd03ce042926ef08157889ed54b1b74b5ee0b3d66dcee4b73" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `audit_header` object optional An alternative way to provide auth information. for internal use only. **Show child properties** `actor_id` string (uint64) optional Example: `12345` `actor_ip` string optional Example: `example string` `actor_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `context_urn` string optional Example: `example string` `origin_application` string optional Example: `example string` `user_id` string (uint64) optional Example: `12345` `user_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `version_hash` string optional Example: `example string` Unique identifier **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "audit_header": { "actor_id": "12345", "actor_ip": "example string", "actor_uuid": "123e4567-e89b-12d3-a456-426614174000", "context_urn": "example string", "origin_application": "example string", "user_id": "12345", "user_uuid": "123e4567-e89b-12d3-a456-426614174000" }, "version_hash": "example string" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Anthropic API Keys `/v2/gen-ai/anthropic/keys` To list all Anthropic API keys, send a GET request to `/v2/gen-ai/anthropic/keys`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/anthropic/keys` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_infos": [ { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Anthropic API Key `/v2/gen-ai/anthropic/keys` To create an Anthropic API key, send a POST request to `/v2/gen-ai/anthropic/keys`. #### Request Body: `application/json` `api_key` string optional Example: `"sk-ant-12345678901234567890123456789012"` Anthropic API key `name` string optional Example: `"Production Key"` Name of the key ##### Request: `/v2/gen-ai/anthropic/keys` ### Payload Content type `application/json` ```json { "api_key": "\"sk-ant-12345678901234567890123456789012\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys" \ -d '{ "api_key": "sk-ant-12345678901234567890123456789012", "name": "test-key" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Anthropic API Key `/v2/gen-ai/anthropic/keys/{api_key_uuid}` To retrieve details of an Anthropic API key, send a GET request to `/v2/gen-ai/anthropic/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/anthropic/keys/{api_key_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Anthropic API Key `/v2/gen-ai/anthropic/keys/{api_key_uuid}` To update an Anthropic API key, send a PUT request to `/v2/gen-ai/anthropic/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID #### Request Body: `application/json` `api_key` string optional Example: `"sk-ant-12345678901234567890123456789012"` Anthropic API key `api_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` API key ID `name` string optional Example: `"Production Key"` Name of the key ##### Request: `/v2/gen-ai/anthropic/keys/{api_key_uuid}` ### Payload Content type `application/json` ```json { "api_key": "\"sk-ant-12345678901234567890123456789012\"", "api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \ -d '{ "api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4", "name": "test-key2" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Anthropic API Key `/v2/gen-ai/anthropic/keys/{api_key_uuid}` To delete an Anthropic API key, send a DELETE request to `/v2/gen-ai/anthropic/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/anthropic/keys/{api_key_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List agents by Anthropic key `/v2/gen-ai/anthropic/keys/{uuid}/agents` List Agents by Anthropic Key. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique ID of Anthropic key #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/anthropic/keys/{uuid}/agents` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/anthropic/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agents` array of object optional **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agents": [ { "api_key_infos": [], "api_keys": [], "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "max_tokens": 123, "mcp_servers": [], "name": "example name", "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Custom Models `/v2/gen-ai/custom_models` To list custom models, send a GET request to `/v2/gen-ai/custom_models`. #### Query Parameters `page` integer optional Example: `1` Page number for pagination. `per_page` integer optional Example: `1` Number of items per page. `status` string, one of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED optional Example: `STATUS_UNSPECIFIED` Filter by model status. Default: `STATUS_UNSPECIFIED` ##### Request: `/v2/gen-ai/custom_models` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_models" \ ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `max_threshold` integer (int64) optional Example: `123` Maximum number of custom models allowed for this team's tier `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `models` array of object optional List of custom models **Show child properties** `active_deployments` array of object optional List of active deployments using this model **Show child properties** `created_at` string optional Example: `example string` RFC 3339 timestamp indicating when the dedicated inference deployment was created `endpoints` object optional Endpoint URLs for a dedicated inference deployment associated with a custom model. **Show child properties** `private_endpoint_fqdn` string optional Example: `example string` Private FQDN for the deployment `public_endpoint_fqdn` string optional Example: `example string` Public FQDN for the deployment `id` string optional Example: `example string` Unique identifier (UUID) of the dedicated inference deployment `name` string optional Example: `example name` Human-readable name of the dedicated inference deployment `region_slug` string optional Example: `example string` Slug of the region where the dedicated inference deployment is running (e.g. "atl1") `state` string optional Example: `example string` Current lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING") `updated_at` string optional Example: `2023-01-01` RFC 3339 timestamp indicating when the dedicated inference deployment was last updated `architecture` string optional Example: `example string` Model architecture type (free-form string from config.json) `config_json` object optional Raw config.json contents from the model repository `context_length` integer (int64) optional Example: `123` Maximum context length supported by the model `cost_estimate_per_month` integer (int64) optional Example: `123` Estimated monthly cost in dollars for hosting `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was created `description` string optional Example: `example string` Description of the custom model `error_message` string optional Example: `example string` User-facing reason the most recent import failed; empty otherwise. `file_count` integer (int64) optional Example: `123` Number of files in the model `input_modalities` array of string optional Example: `["example string"]` Input modalities supported (e.g., text, image) `license` string optional Example: `example string` License under which the model is distributed `name` string optional Example: `example name` Name of the custom model `output_modalities` array of string optional Example: `["example string"]` Output modalities supported (e.g., text, image) `parameters` string (uint64) optional Example: `12345` Number of parameters in the model `source_ref` object optional Reference to the original source of the model **Show child properties** `access_type` string, one of: ACCESS_TYPE_UNSPECIFIED, ACCESS_TYPE_PUBLIC, ACCESS_TYPE_PRIVATE, ACCESS_TYPE_GATED optional Example: `ACCESS_TYPE_UNSPECIFIED` Access level required for the model repository `bucket` string optional Example: `example string` Spaces bucket name `commit_sha` string optional Example: `example string` Git commit SHA of the model version `hf_token` string optional Example: `example string` User-provided HuggingFace token for gated/private models (not persisted in source_ref) `prefix` string optional Example: `example string` Object prefix path in the bucket `region` string optional Example: `example string` Spaces bucket region `repo_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Huggingface repository identifier `source_type` string, one of: SOURCE_TYPE_UNSPECIFIED, SOURCE_TYPE_HUGGINGFACE, SOURCE_TYPE_SPACES_BUCKET, SOURCE_TYPE_SDK_UPLOAD, SOURCE_TYPE_FINE_TUNING optional Example: `SOURCE_TYPE_UNSPECIFIED` Source from which the model was imported `status` string, one of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED optional Example: `STATUS_UNSPECIFIED` Import and deployment status of the custom model `storage_region` string optional Example: `example string` Region of the Spaces bucket where model files are stored `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings `team_id` string (uint64) optional Example: `12345` Team that owns the model `total_size_bytes` string (uint64) optional Example: `12345` Total size of model files in bytes `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was last updated `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the custom model **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "max_threshold": 123, "meta": { "page": 123, "pages": 123, "total": 123 }, "models": [ { "active_deployments": [], "architecture": "example string", "context_length": 123, "cost_estimate_per_month": 123, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "error_message": "example string", "file_count": 123, "input_modalities": [ "example string" ], "license": "example string", "name": "example name", "output_modalities": [ "example string" ], "parameters": "12345", "source_type": "SOURCE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "storage_region": "example string", "team_id": "12345", "total_size_bytes": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Import Custom Model `/v2/gen-ai/custom_models/import` To import a custom model, send a POST request to `/v2/gen-ai/custom_models/import`. #### Request Body: `application/json` `accept_hf_token_storage` boolean optional Example: `true` Whether the caller accepts storage of their HuggingFace token for gated model access `accept_terms_and_conditions` boolean optional Example: `true` Whether the caller accepts the terms and conditions for importing this model `description` string optional Example: `Production model for customer support` Description of the model `name` string optional Example: `my-mistral-7b` Name for the imported model `preferred_gpu_region` string optional Example: `nyc3` Preferred GPU region for deployment `source_ref` object optional Reference to the original source of the model **Show child properties** `access_type` string, one of: ACCESS_TYPE_UNSPECIFIED, ACCESS_TYPE_PUBLIC, ACCESS_TYPE_PRIVATE, ACCESS_TYPE_GATED optional Example: `ACCESS_TYPE_UNSPECIFIED` Access level required for the model repository `bucket` string optional Example: `example string` Spaces bucket name `commit_sha` string optional Example: `example string` Git commit SHA of the model version `hf_token` string optional Example: `example string` User-provided HuggingFace token for gated/private models (not persisted in source_ref) `prefix` string optional Example: `example string` Object prefix path in the bucket `region` string optional Example: `example string` Spaces bucket region `repo_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Huggingface repository identifier `source_type` string, one of: SOURCE_TYPE_UNSPECIFIED, SOURCE_TYPE_HUGGINGFACE, SOURCE_TYPE_SPACES_BUCKET, SOURCE_TYPE_SDK_UPLOAD, SOURCE_TYPE_FINE_TUNING optional Example: `SOURCE_TYPE_UNSPECIFIED` Source from which the model was imported `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings ##### Request: `/v2/gen-ai/custom_models/import` ### Payload Content type `application/json` ```json { "accept_hf_token_storage": true, "accept_terms_and_conditions": true, "description": "Production model for customer support", "name": "my-mistral-7b", "preferred_gpu_region": "nyc3", "source_ref": { "access_type": "ACCESS_TYPE_UNSPECIFIED", "bucket": "example string", "commit_sha": "example string", "hf_token": "example string", "prefix": "example string", "region": "example string", "repo_id": "123e4567-e89b-12d3-a456-426614174000" }, "source_type": "SOURCE_TYPE_UNSPECIFIED", "tags": { "tags": [ "example string" ] } } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_models/import" \ -d '{ "name": "mymodelssss", "source_type": "SOURCE_TYPE_HUGGINGFACE", "source_ref": { "repo_id": "Qwen/Qwen3-1.7B", "access_type": "ACCESS_TYPE_PUBLIC" }, "description": "qwen base model", "preferred_gpu_region": null, "accept_terms_and_conditions": true, "tags": { "tags": ["base-model"] } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `error` string optional Example: `example string` `import_job` object optional Import job tracking for a custom model **Show child properties** `bytes_done` string (uint64) optional Example: `12345` Bytes imported so far `bytes_total` string (uint64) optional Example: `12345` Total bytes to import `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the import completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the job was created `error_message` string optional Example: `example string` Error message if import failed `error_step` string optional Example: `example string` Step at which the error occurred `files_done` integer (int64) optional Example: `123` Number of files imported so far `files_total` integer (int64) optional Example: `123` Total number of files to import `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the import started `status` string optional Example: `example string` Current status of the import job `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the import job `model` object optional Custom model - user-imported model from HuggingFace, Spaces, etc. **Show child properties** `active_deployments` array of object optional List of active deployments using this model **Show child properties** `created_at` string optional Example: `example string` RFC 3339 timestamp indicating when the dedicated inference deployment was created `endpoints` object optional Endpoint URLs for a dedicated inference deployment associated with a custom model. **Show child properties** `private_endpoint_fqdn` string optional Example: `example string` Private FQDN for the deployment `public_endpoint_fqdn` string optional Example: `example string` Public FQDN for the deployment `id` string optional Example: `example string` Unique identifier (UUID) of the dedicated inference deployment `name` string optional Example: `example name` Human-readable name of the dedicated inference deployment `region_slug` string optional Example: `example string` Slug of the region where the dedicated inference deployment is running (e.g. "atl1") `state` string optional Example: `example string` Current lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING") `updated_at` string optional Example: `2023-01-01` RFC 3339 timestamp indicating when the dedicated inference deployment was last updated `architecture` string optional Example: `example string` Model architecture type (free-form string from config.json) `config_json` object optional Raw config.json contents from the model repository `context_length` integer (int64) optional Example: `123` Maximum context length supported by the model `cost_estimate_per_month` integer (int64) optional Example: `123` Estimated monthly cost in dollars for hosting `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was created `description` string optional Example: `example string` Description of the custom model `error_message` string optional Example: `example string` User-facing reason the most recent import failed; empty otherwise. `file_count` integer (int64) optional Example: `123` Number of files in the model `input_modalities` array of string optional Example: `["example string"]` Input modalities supported (e.g., text, image) `license` string optional Example: `example string` License under which the model is distributed `name` string optional Example: `example name` Name of the custom model `output_modalities` array of string optional Example: `["example string"]` Output modalities supported (e.g., text, image) `parameters` string (uint64) optional Example: `12345` Number of parameters in the model `source_ref` object optional Reference to the original source of the model **Show child properties** `access_type` string, one of: ACCESS_TYPE_UNSPECIFIED, ACCESS_TYPE_PUBLIC, ACCESS_TYPE_PRIVATE, ACCESS_TYPE_GATED optional Example: `ACCESS_TYPE_UNSPECIFIED` Access level required for the model repository `bucket` string optional Example: `example string` Spaces bucket name `commit_sha` string optional Example: `example string` Git commit SHA of the model version `hf_token` string optional Example: `example string` User-provided HuggingFace token for gated/private models (not persisted in source_ref) `prefix` string optional Example: `example string` Object prefix path in the bucket `region` string optional Example: `example string` Spaces bucket region `repo_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Huggingface repository identifier `source_type` string, one of: SOURCE_TYPE_UNSPECIFIED, SOURCE_TYPE_HUGGINGFACE, SOURCE_TYPE_SPACES_BUCKET, SOURCE_TYPE_SDK_UPLOAD, SOURCE_TYPE_FINE_TUNING optional Example: `SOURCE_TYPE_UNSPECIFIED` Source from which the model was imported `status` string, one of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED optional Example: `STATUS_UNSPECIFIED` Import and deployment status of the custom model `storage_region` string optional Example: `example string` Region of the Spaces bucket where model files are stored `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings `team_id` string (uint64) optional Example: `12345` Team that owns the model `total_size_bytes` string (uint64) optional Example: `12345` Total size of model files in bytes `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was last updated `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the custom model `validation_steps` array of object optional Validation steps performed during import **Show child properties** `error` string optional Example: `example string` Error message if validation failed `name` string optional Example: `example name` Name of the validation step `passed` boolean optional Example: `true` Whether the validation step passed **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "error": "example string", "import_job": { "bytes_done": "12345", "bytes_total": "12345", "completed_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "error_message": "example string", "error_step": "example string", "files_done": 123, "files_total": 123, "started_at": "2023-01-01T00:00:00Z", "status": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "model": { "active_deployments": [], "architecture": "example string", "context_length": 123, "cost_estimate_per_month": 123, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "error_message": "example string", "file_count": 123, "input_modalities": [ "example string" ], "license": "example string", "name": "example name", "output_modalities": [ "example string" ], "parameters": "12345", "source_ref": { "access_type": "ACCESS_TYPE_UNSPECIFIED", "bucket": "example string", "commit_sha": "example string", "hf_token": "example string", "prefix": "example string", "region": "example string", "repo_id": "123e4567-e89b-12d3-a456-426614174000" }, "source_type": "SOURCE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "storage_region": "example string", "tags": { "tags": [ "example string" ] }, "team_id": "12345", "total_size_bytes": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "validation_steps": [ { "error": "example string", "name": "example name", "passed": true } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Custom Model `/v2/gen-ai/custom_models/{uuid}` To retrieve details of a custom model, send a GET request to `/v2/gen-ai/custom_models/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the custom model to retrieve ##### Request: `/v2/gen-ai/custom_models/{uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_models/11f13e07-1e4f-1325-b542-ca68c578b04b" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `model` object optional Custom model - user-imported model from HuggingFace, Spaces, etc. **Show child properties** `active_deployments` array of object optional List of active deployments using this model **Show child properties** `created_at` string optional Example: `example string` RFC 3339 timestamp indicating when the dedicated inference deployment was created `endpoints` object optional Endpoint URLs for a dedicated inference deployment associated with a custom model. **Show child properties** `private_endpoint_fqdn` string optional Example: `example string` Private FQDN for the deployment `public_endpoint_fqdn` string optional Example: `example string` Public FQDN for the deployment `id` string optional Example: `example string` Unique identifier (UUID) of the dedicated inference deployment `name` string optional Example: `example name` Human-readable name of the dedicated inference deployment `region_slug` string optional Example: `example string` Slug of the region where the dedicated inference deployment is running (e.g. "atl1") `state` string optional Example: `example string` Current lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING") `updated_at` string optional Example: `2023-01-01` RFC 3339 timestamp indicating when the dedicated inference deployment was last updated `architecture` string optional Example: `example string` Model architecture type (free-form string from config.json) `config_json` object optional Raw config.json contents from the model repository `context_length` integer (int64) optional Example: `123` Maximum context length supported by the model `cost_estimate_per_month` integer (int64) optional Example: `123` Estimated monthly cost in dollars for hosting `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was created `description` string optional Example: `example string` Description of the custom model `error_message` string optional Example: `example string` User-facing reason the most recent import failed; empty otherwise. `file_count` integer (int64) optional Example: `123` Number of files in the model `input_modalities` array of string optional Example: `["example string"]` Input modalities supported (e.g., text, image) `license` string optional Example: `example string` License under which the model is distributed `name` string optional Example: `example name` Name of the custom model `output_modalities` array of string optional Example: `["example string"]` Output modalities supported (e.g., text, image) `parameters` string (uint64) optional Example: `12345` Number of parameters in the model `source_ref` object optional Reference to the original source of the model **Show child properties** `access_type` string, one of: ACCESS_TYPE_UNSPECIFIED, ACCESS_TYPE_PUBLIC, ACCESS_TYPE_PRIVATE, ACCESS_TYPE_GATED optional Example: `ACCESS_TYPE_UNSPECIFIED` Access level required for the model repository `bucket` string optional Example: `example string` Spaces bucket name `commit_sha` string optional Example: `example string` Git commit SHA of the model version `hf_token` string optional Example: `example string` User-provided HuggingFace token for gated/private models (not persisted in source_ref) `prefix` string optional Example: `example string` Object prefix path in the bucket `region` string optional Example: `example string` Spaces bucket region `repo_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Huggingface repository identifier `source_type` string, one of: SOURCE_TYPE_UNSPECIFIED, SOURCE_TYPE_HUGGINGFACE, SOURCE_TYPE_SPACES_BUCKET, SOURCE_TYPE_SDK_UPLOAD, SOURCE_TYPE_FINE_TUNING optional Example: `SOURCE_TYPE_UNSPECIFIED` Source from which the model was imported `status` string, one of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED optional Example: `STATUS_UNSPECIFIED` Import and deployment status of the custom model `storage_region` string optional Example: `example string` Region of the Spaces bucket where model files are stored `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings `team_id` string (uint64) optional Example: `12345` Team that owns the model `total_size_bytes` string (uint64) optional Example: `12345` Total size of model files in bytes `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was last updated `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the custom model **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "model": { "active_deployments": [], "architecture": "example string", "context_length": 123, "cost_estimate_per_month": 123, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "error_message": "example string", "file_count": 123, "input_modalities": [ "example string" ], "license": "example string", "name": "example name", "output_modalities": [ "example string" ], "parameters": "12345", "source_ref": { "access_type": "ACCESS_TYPE_UNSPECIFIED", "bucket": "example string", "commit_sha": "example string", "hf_token": "example string", "prefix": "example string", "region": "example string", "repo_id": "123e4567-e89b-12d3-a456-426614174000" }, "source_type": "SOURCE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "storage_region": "example string", "tags": { "tags": [ "example string" ] }, "team_id": "12345", "total_size_bytes": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Custom Model `/v2/gen-ai/custom_models/{uuid}` To delete a custom model, send a DELETE request to `/v2/genai/custom_models/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the custom model to delete ##### Request: `/v2/gen-ai/custom_models/{uuid}` ### cURL ```bash curl -X DELETE \ --header "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_models/11f13e07-1e4f-1325-b542-ca68c578b04b" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `error` string optional Example: `example string` Error message if deletion failed `status` string, one of: DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED, DELETE_CUSTOM_MODEL_STATUS_SUCCESS, DELETE_CUSTOM_MODEL_STATUS_FAIL optional Example: `DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED` Status of delete operation **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "error": "example string", "status": "DELETE_CUSTOM_MODEL_STATUS_UNSPECIFIED" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update Custom Model Metadata `/v2/gen-ai/custom_models/{uuid}/metadata` To update custom model metadata, send a PATCH request to `/v2/gen-ai/custom_models/{uuid}/metadata`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the custom model to update #### Request Body: `application/json` `description` string optional Example: `example string` `input_modalities` array of string optional Example: `["example string"]` Optional new input modalities for the model (replaces existing list when non-empty). Spaces-imported models only. `license` string optional Example: `example string` `name` string optional Example: `example name` `output_modalities` array of string optional Example: `["example string"]` Optional new output modalities for the model (replaces existing list when non-empty). Spaces-imported models only. `parameters` string (uint64) optional Example: `12345` `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings `uuid` string optional Example: `a1b2c3d4-...` UUID of the custom model to update ##### Request: `/v2/gen-ai/custom_models/{uuid}/metadata` ### Payload Content type `application/json` ```json { "description": "example string", "input_modalities": [ "example string" ], "license": "example string", "name": "example name", "output_modalities": [ "example string" ], "parameters": "12345", "tags": { "tags": [ "example string" ] }, "uuid": "a1b2c3d4-..." } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_models/11f13d93-a879-c342-b542-ca68c578b04b/metadata" \ -d '{ "description": "finetuned model with olympiad math data", "tags": { "tags": ["finetuned", "new"] }, "input_modalities": ["text"], "output_modalities": ["text"], "parameters": "7000000000", "license": "apache-2.0" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `model` object optional Custom model - user-imported model from HuggingFace, Spaces, etc. **Show child properties** `active_deployments` array of object optional List of active deployments using this model **Show child properties** `created_at` string optional Example: `example string` RFC 3339 timestamp indicating when the dedicated inference deployment was created `endpoints` object optional Endpoint URLs for a dedicated inference deployment associated with a custom model. **Show child properties** `private_endpoint_fqdn` string optional Example: `example string` Private FQDN for the deployment `public_endpoint_fqdn` string optional Example: `example string` Public FQDN for the deployment `id` string optional Example: `example string` Unique identifier (UUID) of the dedicated inference deployment `name` string optional Example: `example name` Human-readable name of the dedicated inference deployment `region_slug` string optional Example: `example string` Slug of the region where the dedicated inference deployment is running (e.g. "atl1") `state` string optional Example: `example string` Current lifecycle state of the dedicated inference deployment (e.g. "ACTIVE", "PROVISIONING") `updated_at` string optional Example: `2023-01-01` RFC 3339 timestamp indicating when the dedicated inference deployment was last updated `architecture` string optional Example: `example string` Model architecture type (free-form string from config.json) `config_json` object optional Raw config.json contents from the model repository `context_length` integer (int64) optional Example: `123` Maximum context length supported by the model `cost_estimate_per_month` integer (int64) optional Example: `123` Estimated monthly cost in dollars for hosting `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was created `description` string optional Example: `example string` Description of the custom model `error_message` string optional Example: `example string` User-facing reason the most recent import failed; empty otherwise. `file_count` integer (int64) optional Example: `123` Number of files in the model `input_modalities` array of string optional Example: `["example string"]` Input modalities supported (e.g., text, image) `license` string optional Example: `example string` License under which the model is distributed `name` string optional Example: `example name` Name of the custom model `output_modalities` array of string optional Example: `["example string"]` Output modalities supported (e.g., text, image) `parameters` string (uint64) optional Example: `12345` Number of parameters in the model `source_ref` object optional Reference to the original source of the model **Show child properties** `access_type` string, one of: ACCESS_TYPE_UNSPECIFIED, ACCESS_TYPE_PUBLIC, ACCESS_TYPE_PRIVATE, ACCESS_TYPE_GATED optional Example: `ACCESS_TYPE_UNSPECIFIED` Access level required for the model repository `bucket` string optional Example: `example string` Spaces bucket name `commit_sha` string optional Example: `example string` Git commit SHA of the model version `hf_token` string optional Example: `example string` User-provided HuggingFace token for gated/private models (not persisted in source_ref) `prefix` string optional Example: `example string` Object prefix path in the bucket `region` string optional Example: `example string` Spaces bucket region `repo_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Huggingface repository identifier `source_type` string, one of: SOURCE_TYPE_UNSPECIFIED, SOURCE_TYPE_HUGGINGFACE, SOURCE_TYPE_SPACES_BUCKET, SOURCE_TYPE_SDK_UPLOAD, SOURCE_TYPE_FINE_TUNING optional Example: `SOURCE_TYPE_UNSPECIFIED` Source from which the model was imported `status` string, one of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED optional Example: `STATUS_UNSPECIFIED` Import and deployment status of the custom model `storage_region` string optional Example: `example string` Region of the Spaces bucket where model files are stored `tags` object optional User-defined tags for organizing models **Show child properties** `tags` array of string optional Example: `["example string"]` List of tag strings `team_id` string (uint64) optional Example: `12345` Team that owns the model `total_size_bytes` string (uint64) optional Example: `12345` Total size of model files in bytes `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the model was last updated `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the custom model **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "model": { "active_deployments": [], "architecture": "example string", "context_length": 123, "cost_estimate_per_month": 123, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "error_message": "example string", "file_count": 123, "input_modalities": [ "example string" ], "license": "example string", "name": "example name", "output_modalities": [ "example string" ], "parameters": "12345", "source_ref": { "access_type": "ACCESS_TYPE_UNSPECIFIED", "bucket": "example string", "commit_sha": "example string", "hf_token": "example string", "prefix": "example string", "region": "example string", "repo_id": "123e4567-e89b-12d3-a456-426614174000" }, "source_type": "SOURCE_TYPE_UNSPECIFIED", "status": "STATUS_UNSPECIFIED", "storage_region": "example string", "tags": { "tags": [ "example string" ] }, "team_id": "12345", "total_size_bytes": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Evaluation Datasets `/v2/gen-ai/evaluation_datasets` To list evaluation datasets, send a GET request to `/v2/gen-ai/evaluation_datasets`. #### Query Parameters `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` Filter by evaluation dataset type. Default: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` Filter by evaluation dataset paradigm (row/content shape). Default: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` `has_ground_truth` boolean optional Example: `true` Filter by whether the dataset includes ground-truth values. ##### Request: `/v2/gen-ai/evaluation_datasets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_datasets" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_datasets` array of object optional The list of evaluation datasets. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_datasets": [ { "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_paradigm": "EVALUATION_DATASET_PARADIGM_SINGLE_TURN", "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "file_size": "12345", "has_ground_truth": true, "row_count": 123 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Evaluation Dataset `/v2/gen-ai/evaluation_datasets` To create an evaluation dataset, send a POST request to `/v2/gen-ai/evaluation_datasets`. #### Request Body: `application/json` `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `file_upload_dataset` object optional File to upload as data source for knowledge base. **Show child properties** `original_file_name` string optional Example: `example name` The original file name `size_in_bytes` string (uint64) optional Example: `12345` The size of the file in bytes `stored_object_key` string optional Example: `example string` The object key the file was stored as `name` string optional Example: `example name` The name of the agent evaluation dataset. ##### Request: `/v2/gen-ai/evaluation_datasets` ### Payload Content type `application/json` ```json { "dataset_paradigm": "EVALUATION_DATASET_PARADIGM_SINGLE_TURN", "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN", "file_upload_dataset": { "original_file_name": "example name", "size_in_bytes": "12345", "stored_object_key": "example string" }, "name": "example name" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_datasets" \ -d '{ "name": "dataset.csv", "file_upload_dataset": { "original_file_name": "dataset.csv", "stored_object_key": "123abc", "size_in_bytes": 255 } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation dataset uuid. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_dataset_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Presigned URLs for Evaluation Dataset File Upload `/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls` To create presigned URLs for evaluation dataset file upload, send a POST request to `/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls`. #### Request Body: `application/json` `files` array of object optional A list of files to generate presigned URLs for. **Show child properties** `file_name` string optional Example: `example name` Local filename `file_size` string (int64) optional Example: `12345` The size of the file in bytes. ##### Request: `/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls` ### Payload Content type `application/json` ```json { "files": [ { "file_name": "example name", "file_size": "12345" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/file_upload_presigned_urls" \ -d '{ "files": [{ "file_name": "dataset.csv", "file_size": 2048 }] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `request_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The ID generated for the request for Presigned URLs. `uploads` array of object optional A list of generated presigned URLs and object keys, one per file. **Show child properties** `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the url expires at. `object_key` string optional Example: `example string` The unique object key to store the file as. `original_file_name` string optional Example: `example name` The original file name. `presigned_url` string optional Example: `example string` The actual presigned URL the client can use to upload the file directly. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "request_id": "123e4567-e89b-12d3-a456-426614174000", "uploads": [ { "expires_at": "2023-01-01T00:00:00Z", "object_key": "example string", "original_file_name": "example name", "presigned_url": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Evaluation Dataset `/v2/gen-ai/evaluation_datasets/{dataset_uuid}` To delete an evaluation dataset, send a DELETE request to `/v2/genai/evaluation_datasets/{dataset_uuid}`. This works for both model and agent evaluation datasets. #### Path Parameters `dataset_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation dataset to delete. ##### Request: `/v2/gen-ai/evaluation_datasets/{dataset_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Download URL for Evaluation Dataset `/v2/gen-ai/evaluation_datasets/{dataset_uuid}/download_url` To get a presigned download URL for an evaluation dataset, send a GET request to `/v2/genai/evaluation_datasets/{dataset_uuid}/download_url`. #### Path Parameters `dataset_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation dataset. ##### Request: `/v2/gen-ai/evaluation_datasets/{dataset_uuid}/download_url` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_datasets/123e4567-e89b-12d3-a456-426614174000/download_url" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `download_url` string optional Example: `example string` The presigned URL to download the dataset file. `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the URL expires at. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "download_url": "example string", "expires_at": "2023-01-01T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Evaluation Metrics `/v2/gen-ai/evaluation_metrics` To list all evaluation metrics, send a GET request to `/v2/gen-ai/evaluation_metrics`. ##### Request: `/v2/gen-ai/evaluation_metrics` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_metrics" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "metrics": [ { "associated_presets": [], "category": "METRIC_CATEGORY_UNSPECIFIED", "description": "example string", "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", "inverted": true, "is_metric_goal": true, "metric_name": "example name", "metric_rank": 123, "metric_type": "METRIC_TYPE_UNSPECIFIED", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "range_max": 123, "range_min": 123, "source": "EVALUATION_METRIC_SOURCE_UNSPECIFIED", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Custom Evaluation Metric `/v2/gen-ai/custom_evaluation_metrics` To create a custom LLM-as-judge metric for model evaluation, send a POST request to `/v2/gen-ai/custom_evaluation_metrics`. #### Request Body: `application/json` `config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `"Scores adherence to our support macros"` `metric_name` string optional Example: `"My domain tone metric"` ##### Request: `/v2/gen-ai/custom_evaluation_metrics` ### Payload Content type `application/json` ```json { "config": { "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "requires_ground_truth": true, "scoring_prompt": "example string", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z" }, "description": "\"Scores adherence to our support macros\"", "metric_name": "\"My domain tone metric\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_evaluation_metrics" \ -d '{ "metric_name": "My domain tone metric", "description": "Scores adherence to our support macros", "config": { "requires_ground_truth": true, "scoring_prompt": "Grade for brand tone and factuality.", "turn_type": "EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN" } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `metric` object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "metric": { "associated_presets": [], "category": "METRIC_CATEGORY_UNSPECIFIED", "custom_eval_config": { "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "requires_ground_truth": true, "scoring_prompt": "example string", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z" }, "description": "example string", "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", "inverted": true, "is_metric_goal": true, "metric_name": "example name", "metric_rank": 123, "metric_type": "METRIC_TYPE_UNSPECIFIED", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "range_max": 123, "range_min": 123, "source": "EVALUATION_METRIC_SOURCE_UNSPECIFIED", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Custom Evaluation Metric `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}` To update a custom metric (issuing a new metric UUID), send a PUT request to `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}`. #### Path Parameters `metric_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the custom metric to update. #### Request Body: `application/json` `config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `metric_name` string optional Example: `"My domain tone metric"` `metric_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` ##### Request: `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}` ### Payload Content type `application/json` ```json { "config": { "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "requires_ground_truth": true, "scoring_prompt": "example string", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z" }, "description": "example string", "metric_name": "\"My domain tone metric\"", "metric_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_evaluation_metrics/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" \ -d '{ "metric_uuid": "e51dba65-cf7a-11ef-bf8f-4e013e2ddde4", "metric_name": "My domain tone metric", "description": "Scores adherence to our support macros", "config": { "requires_ground_truth": true, "scoring_prompt": "Grade for brand tone and factuality." } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `metric` object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "metric": { "associated_presets": [], "category": "METRIC_CATEGORY_UNSPECIFIED", "custom_eval_config": { "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "requires_ground_truth": true, "scoring_prompt": "example string", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z" }, "description": "example string", "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", "inverted": true, "is_metric_goal": true, "metric_name": "example name", "metric_rank": 123, "metric_type": "METRIC_TYPE_UNSPECIFIED", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "range_max": 123, "range_min": 123, "source": "EVALUATION_METRIC_SOURCE_UNSPECIFIED", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Custom Evaluation Metric `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}` To soft-delete a custom model evaluation metric, send a DELETE request to `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}`. #### Path Parameters `metric_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the custom metric to delete. ##### Request: `/v2/gen-ai/custom_evaluation_metrics/{metric_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/custom_evaluation_metrics/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Run an Evaluation Test Case `/v2/gen-ai/evaluation_runs` To run an evaluation test case, send a POST request to `/v2/gen-ai/evaluation_runs`. #### Request Body: `application/json` `agent_deployment_names` array of string optional Example: `["example string"]` Agent deployment names to run the test case against. `agent_uuids` array of string optional Example: `["example string"]` Agent UUIDs to run the test case against (legacy agents). `run_name` string optional Example: `Evaluation Run Name` The name of the run. `test_case_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Test-case UUID to run ##### Request: `/v2/gen-ai/evaluation_runs` ### Payload Content type `application/json` ```json { "agent_deployment_names": [ "example string" ], "agent_uuids": [ "example string" ], "run_name": "Evaluation Run Name", "test_case_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_runs" \ -d '{ "test_case_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "agent_uuids": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"], "run_name": "My Evaluation Run", }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_run_uuids` array of string optional Example: `["example string"]` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_run_uuids": [ "example string" ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Information About an Existing Evaluation Run `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}` To retrive information about an existing evaluation run, send a GET request to `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}`. #### Path Parameters `evaluation_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Evaluation run UUID. ##### Request: `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_run` object optional **Show child properties** `agent_deleted` boolean optional Example: `true` Whether agent is deleted `agent_deployment_name` string optional Example: `example name` The agent deployment name `agent_name` string optional Example: `example name` Agent name `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent UUID. `agent_version_hash` string optional Example: `example string` Version hash `agent_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent workspace uuid `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `error_description` string optional Example: `example string` The error description `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation run UUID. `evaluation_test_case_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation test case workspace uuid `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run end time. `pass_status` boolean optional Example: `true` The pass status of the evaluation run based on the star metric. `queued_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run queued time. `run_level_metric_results` array of object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `run_name` string optional Example: `example name` Run name. `star_metric_result` object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run start time. `status` string (enum) optional Example: `EVALUATION_RUN_STATUS_UNSPECIFIED` Evaluation Run Statuses `test_case_description` string optional Example: `example string` Test case description. `test_case_name` string optional Example: `example name` Test case name. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Test-case UUID. `test_case_version` integer (int64) optional Example: `123` Test-case-version. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_run": { "agent_deleted": true, "agent_deployment_name": "example name", "agent_name": "example name", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_version_hash": "example string", "agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "error_description": "example string", "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "finished_at": "2023-01-01T00:00:00Z", "pass_status": true, "queued_at": "2023-01-01T00:00:00Z", "run_level_metric_results": [], "run_name": "example name", "star_metric_result": { "error_description": "example string", "metric_name": "example name", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "number_value": 123, "passed": true, "reasoning": "example string", "status": "EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED", "string_value": "example string" }, "started_at": "2023-01-01T00:00:00Z", "status": "EVALUATION_RUN_STATUS_UNSPECIFIED", "test_case_description": "example string", "test_case_name": "example name", "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "test_case_version": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Results of an Evaluation Run `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results` To retrieve results of an evaluation run, send a GET request to `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results`. #### Path Parameters `evaluation_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Evaluation run UUID. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4/results" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_run` object optional **Show child properties** `agent_deleted` boolean optional Example: `true` Whether agent is deleted `agent_deployment_name` string optional Example: `example name` The agent deployment name `agent_name` string optional Example: `example name` Agent name `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent UUID. `agent_version_hash` string optional Example: `example string` Version hash `agent_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent workspace uuid `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `error_description` string optional Example: `example string` The error description `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation run UUID. `evaluation_test_case_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation test case workspace uuid `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run end time. `pass_status` boolean optional Example: `true` The pass status of the evaluation run based on the star metric. `queued_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run queued time. `run_level_metric_results` array of object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `run_name` string optional Example: `example name` Run name. `star_metric_result` object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run start time. `status` string (enum) optional Example: `EVALUATION_RUN_STATUS_UNSPECIFIED` Evaluation Run Statuses `test_case_description` string optional Example: `example string` Test case description. `test_case_name` string optional Example: `example name` Test case name. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Test-case UUID. `test_case_version` integer (int64) optional Example: `123` Test-case-version. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `prompts` array of object optional The prompt level results. **Show child properties** `evaluation_trace_spans` array of object optional The evaluated trace spans. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When the span was created `input` object optional Input data for the span (flexible structure - can be messages array, string, etc.) `name` string optional Example: `example name` Name/identifier for the span `output` object optional Output data from the span (flexible structure - can be message, string, etc.) `retriever_chunks` array of object optional Any retriever span chunks that were included as part of the span. **Show child properties** `chunk_usage_pct` number (double) optional Example: `123` The usage percentage of the chunk. `chunk_used` boolean optional Example: `true` Indicates if the chunk was used in the prompt. `index_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The index uuid (Knowledge Base) of the chunk. `source_name` string optional Example: `example name` The source name for the chunk, e.g., the file name or document title. `text` string optional Example: `example string` Text content of the chunk. `span_level_metric_results` array of object optional The span-level metric results. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `spans` array of object optional Child spans - must contain between 1 and 999 spans Allowed types: agent, llm, tool, retriever (not workflow) **Show child properties** `agent` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When the span was created `input` object optional Input data for the span (flexible structure - can be messages array, string, etc.) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `llm` object optional LLM span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name/identifier for the span `output` object optional Output data from the span (flexible structure - can be message, string, etc.) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `retriever` object optional Retriever span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` object optional Tool span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string (enum) optional Example: `TRACE_SPAN_TYPE_UNKNOWN` Types of spans in a trace `workflow` object optional Workflow span - can contain child spans (agent, llm, tool, retriever) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string (enum) optional Example: `TRACE_SPAN_TYPE_UNKNOWN` Types of spans in a trace `ground_truth` string optional Example: `example string` The ground truth for the prompt. `input` string optional Example: `example string` `input_tokens` string (uint64) optional Example: `12345` The number of input tokens used in the prompt. `output` string optional Example: `example string` `output_tokens` string (uint64) optional Example: `12345` The number of output tokens used in the prompt. `prompt_chunks` array of object optional The list of prompt chunks. **Show child properties** `chunk_usage_pct` number (double) optional Example: `123` The usage percentage of the chunk. `chunk_used` boolean optional Example: `true` Indicates if the chunk was used in the prompt. `index_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The index uuid (Knowledge Base) of the chunk. `source_name` string optional Example: `example name` The source name for the chunk, e.g., the file name or document title. `text` string optional Example: `example string` Text content of the chunk. `prompt_id` integer (int64) optional Example: `123` Prompt ID `prompt_level_metric_results` array of object optional The metric results for the prompt. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `trace_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The trace id for the prompt. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_run": { "agent_deleted": true, "agent_deployment_name": "example name", "agent_name": "example name", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_version_hash": "example string", "agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "error_description": "example string", "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "finished_at": "2023-01-01T00:00:00Z", "pass_status": true, "queued_at": "2023-01-01T00:00:00Z", "run_level_metric_results": [], "run_name": "example name", "star_metric_result": { "error_description": "example string", "metric_name": "example name", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "number_value": 123, "passed": true, "reasoning": "example string", "status": "EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED", "string_value": "example string" }, "started_at": "2023-01-01T00:00:00Z", "status": "EVALUATION_RUN_STATUS_UNSPECIFIED", "test_case_description": "example string", "test_case_name": "example name", "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "test_case_version": 123 }, "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "prompts": [ { "evaluation_trace_spans": [], "ground_truth": "example string", "input": "example string", "input_tokens": "12345", "output": "example string", "output_tokens": "12345", "prompt_chunks": [], "prompt_id": 123, "prompt_level_metric_results": [], "trace_id": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Results of an Evaluation Run Prompt `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}` To retrieve results of an evaluation run, send a GET request to `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}`. #### Path Parameters `evaluation_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Evaluation run UUID. `prompt_id` integer required Example: `1` Prompt ID to get results for. ##### Request: `/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_runs/9758a232-b351-11ef-bf8f-4e013e2ddde4/results/c441bf77-81d6-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `prompt` object optional **Show child properties** `evaluation_trace_spans` array of object optional The evaluated trace spans. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When the span was created `input` object optional Input data for the span (flexible structure - can be messages array, string, etc.) `name` string optional Example: `example name` Name/identifier for the span `output` object optional Output data from the span (flexible structure - can be message, string, etc.) `retriever_chunks` array of object optional Any retriever span chunks that were included as part of the span. **Show child properties** `chunk_usage_pct` number (double) optional Example: `123` The usage percentage of the chunk. `chunk_used` boolean optional Example: `true` Indicates if the chunk was used in the prompt. `index_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The index uuid (Knowledge Base) of the chunk. `source_name` string optional Example: `example name` The source name for the chunk, e.g., the file name or document title. `text` string optional Example: `example string` Text content of the chunk. `span_level_metric_results` array of object optional The span-level metric results. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `spans` array of object optional Child spans - must contain between 1 and 999 spans Allowed types: agent, llm, tool, retriever (not workflow) **Show child properties** `agent` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When the span was created `input` object optional Input data for the span (flexible structure - can be messages array, string, etc.) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `llm` object optional LLM span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name/identifier for the span `output` object optional Output data from the span (flexible structure - can be message, string, etc.) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `retriever` object optional Retriever span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` object optional Tool span *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string (enum) optional Example: `TRACE_SPAN_TYPE_UNKNOWN` Types of spans in a trace `workflow` object optional Workflow span - can contain child spans (agent, llm, tool, retriever) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string (enum) optional Example: `TRACE_SPAN_TYPE_UNKNOWN` Types of spans in a trace `ground_truth` string optional Example: `example string` The ground truth for the prompt. `input` string optional Example: `example string` `input_tokens` string (uint64) optional Example: `12345` The number of input tokens used in the prompt. `output` string optional Example: `example string` `output_tokens` string (uint64) optional Example: `12345` The number of output tokens used in the prompt. `prompt_chunks` array of object optional The list of prompt chunks. **Show child properties** `chunk_usage_pct` number (double) optional Example: `123` The usage percentage of the chunk. `chunk_used` boolean optional Example: `true` Indicates if the chunk was used in the prompt. `index_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The index uuid (Knowledge Base) of the chunk. `source_name` string optional Example: `example name` The source name for the chunk, e.g., the file name or document title. `text` string optional Example: `example string` Text content of the chunk. `prompt_id` integer (int64) optional Example: `123` Prompt ID `prompt_level_metric_results` array of object optional The metric results for the prompt. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `trace_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The trace id for the prompt. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "prompt": { "evaluation_trace_spans": [], "ground_truth": "example string", "input": "example string", "input_tokens": "12345", "output": "example string", "output_tokens": "12345", "prompt_chunks": [], "prompt_id": 123, "prompt_level_metric_results": [], "trace_id": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Evaluation Test Cases `/v2/gen-ai/evaluation_test_cases` To list all evaluation test cases, send a GET request to `/v2/gen-ai/evaluation_test_cases`. ##### Request: `/v2/gen-ai/evaluation_test_cases` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_test_cases` array of object optional Alternative way of authentication for internal usage only - should not be exposed to public api **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_test_cases": [ { "archived_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "description": "example string", "latest_version_number_of_runs": 123, "metrics": [], "name": "example name", "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "total_runs": 123, "updated_at": "2023-01-01T00:00:00Z", "updated_by_user_email": "example@example.com", "updated_by_user_id": "12345", "version": 123 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Evaluation Test Case. `/v2/gen-ai/evaluation_test_cases` To create an evaluation test-case send a POST request to `/v2/gen-ai/evaluation_test_cases`. #### Request Body: `application/json` `agent_workspace_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Dataset against which the test‑case is executed. `description` string optional Example: `example string` Description of the test case. `metrics` array of string optional Example: `["example string"]` Full metric list to use for evaluation test case. `name` string optional Example: `example name` Name of the test case. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The workspace uuid. ##### Request: `/v2/gen-ai/evaluation_test_cases` ### Payload Content type `application/json` ```json { "agent_workspace_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "description": "example string", "metrics": [ "example string" ], "name": "example name", "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 }, "workspace_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases" \ -d '{ "name": "Test Case", "description": "Description of the test case", "dataset_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "metrics": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"], "star_metric": { "metric_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "name": "Retrieved chunk usage", "success_threshold_pct": 80 }, "workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Test‑case UUID. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Evaluation Runs by Test Case `/v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs` To list all evaluation runs by test case, send a GET request to `/v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs`. #### Path Parameters `evaluation_test_case_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Evaluation run UUID. #### Query Parameters `evaluation_test_case_version` integer optional Example: `1` Version of the test case. ##### Request: `/v2/gen-ai/evaluation_test_cases/{evaluation_test_case_uuid}/evaluation_runs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/evaluation_runs" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_runs` array of object optional List of evaluation runs. **Show child properties** `agent_deleted` boolean optional Example: `true` Whether agent is deleted `agent_deployment_name` string optional Example: `example name` The agent deployment name `agent_name` string optional Example: `example name` Agent name `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent UUID. `agent_version_hash` string optional Example: `example string` Version hash `agent_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent workspace uuid `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `error_description` string optional Example: `example string` The error description `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation run UUID. `evaluation_test_case_workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Evaluation test case workspace uuid `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run end time. `pass_status` boolean optional Example: `true` The pass status of the evaluation run based on the star metric. `queued_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run queued time. `run_level_metric_results` array of object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `run_name` string optional Example: `example name` Run name. `star_metric_result` object optional **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run start time. `status` string (enum) optional Example: `EVALUATION_RUN_STATUS_UNSPECIFIED` Evaluation Run Statuses `test_case_description` string optional Example: `example string` Test case description. `test_case_name` string optional Example: `example name` Test case name. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Test-case UUID. `test_case_version` integer (int64) optional Example: `123` Test-case-version. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_runs": [ { "agent_deleted": true, "agent_deployment_name": "example name", "agent_name": "example name", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_version_hash": "example string", "agent_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "error_description": "example string", "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "evaluation_test_case_workspace_uuid": "123e4567-e89b-12d3-a456-426614174000", "finished_at": "2023-01-01T00:00:00Z", "pass_status": true, "queued_at": "2023-01-01T00:00:00Z", "run_level_metric_results": [], "run_name": "example name", "started_at": "2023-01-01T00:00:00Z", "status": "EVALUATION_RUN_STATUS_UNSPECIFIED", "test_case_description": "example string", "test_case_name": "example name", "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "test_case_version": 123 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Information About an Existing Evaluation Test Case `/v2/gen-ai/evaluation_test_cases/{test_case_uuid}` To retrive information about an existing evaluation test case, send a GET request to `/v2/gen-ai/evaluation_test_case/{test_case_uuid}`. #### Path Parameters `test_case_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The test case uuid to retrieve. #### Query Parameters `evaluation_test_case_version` integer optional Example: `1` Version of the test case. ##### Request: `/v2/gen-ai/evaluation_test_cases/{test_case_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/9758a232-b351-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_test_case` object optional **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_test_case": { "archived_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "dataset": { "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_paradigm": "EVALUATION_DATASET_PARADIGM_SINGLE_TURN", "dataset_type": "EVALUATION_DATASET_TYPE_UNKNOWN", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "file_size": "12345", "has_ground_truth": true, "row_count": 123 }, "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "description": "example string", "latest_version_number_of_runs": 123, "metrics": [], "name": "example name", "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 }, "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "total_runs": 123, "updated_at": "2023-01-01T00:00:00Z", "updated_by_user_email": "example@example.com", "updated_by_user_id": "12345", "version": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update an Evaluation Test Case. `/v2/gen-ai/evaluation_test_cases/{test_case_uuid}` To update an evaluation test-case send a PUT request to `/v2/gen-ai/evaluation_test_cases/{test_case_uuid}`. #### Path Parameters `test_case_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Test-case UUID to update #### Request Body: `application/json` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Dataset against which the test‑case is executed. `description` string optional Example: `example string` Description of the test case. `metrics` object optional **Show child properties** `metric_uuids` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the test case. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Test-case UUID to update ##### Request: `/v2/gen-ai/evaluation_test_cases/{test_case_uuid}` ### Payload Content type `application/json` ```json { "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "description": "example string", "metrics": { "metric_uuids": [ "example string" ] }, "name": "example name", "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 }, "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/evaluation_test_cases/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" \ -d '{ "test_case_uuid": "e51dba65-cf7a-11ef-bf8f-4e013e2ddde4", "name": "Updated Test Case", "description": "Updated description of the test case", "dataset_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "metrics": ["1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "2b418231-b7d6-11ef-bf8f-4e013e2ddde4"], "star_metric": { "metric_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "name": "Retrieved chunk usage", "success_threshold_pct": 80 } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `version` integer (int32) optional Example: `123` The new verson of the test case. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "version": 123 } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Indexing Jobs for a Knowledge Base `/v2/gen-ai/indexing_jobs` To list all indexing jobs for a knowledge base, send a GET request to `/v2/gen-ai/indexing_jobs`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/indexing_jobs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/indexing_jobs" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `jobs` array of object optional The indexing jobs **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "jobs": [ { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Start Indexing Job for a Knowledge Base `/v2/gen-ai/indexing_jobs` To start an indexing job for a knowledge base, send a POST request to `/v2/gen-ai/indexing_jobs`. #### Request Body: `application/json` `data_source_uuids` array of string optional Example: `["example string"]` List of data source ids to index, if none are provided, all data sources will be indexed `knowledge_base_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Knowledge base id ##### Request: `/v2/gen-ai/indexing_jobs` ### Payload Content type `application/json` ```json { "data_source_uuids": [ "example string" ], "knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/indexing_jobs" \ -d '{ "knowledge_base_uuid": "9758a232-b351-11ef-bf8f-4e013e2ddde4", "data_source_uuids": [ "9a825ee0-bbb1-11ef-bf8f-4e013e2ddde4" ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Data Sources for Indexing Job for a Knowledge Base `/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources` To list all datasources for an indexing job, send a GET request to `/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources`. #### Path Parameters `indexing_job_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Uuid of the indexing job ##### Request: `/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/data_sources` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/indexing_jobs/9758a232-b351-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `indexed_data_sources` array of object optional **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "indexed_data_sources": [ { "completed_at": "2023-01-01T00:00:00Z", "data_source_uuid": "123e4567-e89b-12d3-a456-426614174000", "error_details": "example string", "error_msg": "example string", "failed_item_count": "12345", "indexed_file_count": "12345", "indexed_item_count": "12345", "removed_item_count": "12345", "skipped_item_count": "12345", "started_at": "2023-01-01T00:00:00Z", "status": "DATA_SOURCE_STATUS_UNKNOWN", "total_bytes": "12345", "total_bytes_indexed": "12345", "total_file_count": "12345" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Signed URL for Indexing Job Details `/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url` To get a signed URL for indexing job details, send a GET request to `/v2/gen-ai/indexing_jobs/{uuid}/details_signed_url`. #### Path Parameters `indexing_job_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` The uuid of the indexing job ##### Request: `/v2/gen-ai/indexing_jobs/{indexing_job_uuid}/details_signed_url` ### cURL ```bash curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/indexing_jobs/6b090372-a8c3-11f0-b542-ca68c578b04b/details_signed_url' \ --header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \ --header 'Content-Type: application/json' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `signed_url` string optional Example: `example string` The signed url for downloading the indexing job details **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "signed_url": "example string" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Status of Indexing Job for a Knowledge Base `/v2/gen-ai/indexing_jobs/{uuid}` To get status of an indexing Job for a knowledge base, send a GET request to `/v2/gen-ai/indexing_jobs/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Indexing job id ##### Request: `/v2/gen-ai/indexing_jobs/{uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/indexing_jobs/9758a232-b351-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Cancel Indexing Job for a Knowledge Base `/v2/gen-ai/indexing_jobs/{uuid}/cancel` To cancel an indexing job for a knowledge base, send a PUT request to `/v2/gen-ai/indexing_jobs/{uuid}/cancel`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` A unique identifier for an indexing job. #### Request Body: `application/json` `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` A unique identifier for an indexing job. ##### Request: `/v2/gen-ai/indexing_jobs/{uuid}/cancel` ### Payload Content type `application/json` ```json { "uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/indexing_jobs/79ca9798-cf7d-11ef-bf8f-4e013e2ddde4/cancel" \ -d '{ "uuid": "79ca9798-cf7d-11ef-bf8f-4e013e2ddde4" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Knowledge Bases `/v2/gen-ai/knowledge_bases` To list all knowledge bases, send a GET request to `/v2/gen-ai/knowledge_bases`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/knowledge_bases` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_bases` array of object optional The knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_bases": [ { "added_to_agent_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "database_id": "123e4567-e89b-12d3-a456-426614174000", "embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "is_public": true, "name": "example name", "project_id": "123e4567-e89b-12d3-a456-426614174000", "region": "example string", "tags": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Knowledge Base `/v2/gen-ai/knowledge_bases` To create a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases`. #### Request Body: `application/json` `database_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` Identifier of the DigitalOcean OpenSearch database this knowledge base will use, optional. If not provided, we create a new database for the knowledge base in the same region as the knowledge base. `datasources` array of object optional Optional data sources to attach at creation. Omit or use an empty list to create the knowledge base without sources, then add sources (with chunking strategy and sizes) using [Add a Data Source to a Knowledge Base](#create_knowledge_base_data_source). When provided, see [Organize Data Sources](https://docs.digitalocean.com/products/inference/how-to/create-manage-agent-knowledge-bases/index.html.md#add-data-sources) for best practices. **Show child properties** `aws_data_source` object optional AWS S3 Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `key_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The AWS Key ID `region` string optional Example: `example string` Region of bucket `secret_key` string optional Example: `example string` The AWS Secret Key `bucket_name` string optional Example: `example name` Deprecated, moved to data_source_details `bucket_region` string optional Example: `example string` Deprecated, moved to data_source_details `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `dropbox_data_source` object optional Dropbox Data Source **Show child properties** `folder` string optional Example: `example string` `refresh_token` string optional Example: `example string` Refresh token. you can obrain a refresh token by following the oauth2 flow. see /v2/gen-ai/oauth2/dropbox/tokens for reference. `file_upload_data_source` object optional File to upload as data source for knowledge base. **Show child properties** `original_file_name` string optional Example: `example name` The original file name `size_in_bytes` string (uint64) optional Example: `12345` The size of the file in bytes `stored_object_key` string optional Example: `example string` The object key the file was stored as `google_drive_data_source` object optional Google Drive Data Source **Show child properties** `folder_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `refresh_token` string optional Example: `example string` Refresh token. you can obrain a refresh token by following the oauth2 flow. see /v2/gen-ai/oauth2/google/tokens for reference. `item_path` string optional Example: `example string` `spaces_data_source` object optional Spaces Bucket Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `web_crawler_data_source` object optional WebCrawlerDataSource **Show child properties** `base_url` string optional Example: `example string` The base url to crawl. `crawling_option` string (enum) optional Example: `UNKNOWN` Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. `embed_media` boolean optional Example: `true` Whether to ingest and index media (images, etc.) on web pages. `exclude_tags` array of string optional Example: `["example string"]` Declaring which tags to exclude in web pages while webcrawling `embedding_model_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Identifier for the [embedding model](https://docs.digitalocean.com/products/genai-platform/details/models/index.html.md#embedding-models). `name` string optional Example: `"My Knowledge Base"` Name of the knowledge base. `project_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` Identifier of the DigitalOcean project this knowledge base will belong to. `region` string optional Example: `"tor1"` The datacenter region to deploy the knowledge base in. `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `size` string, one of: OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED, OPEN_SEARCH_PLAN_SIZE_SMALL, OPEN_SEARCH_PLAN_SIZE_MEDIUM, OPEN_SEARCH_PLAN_SIZE_LARGE, OPEN_SEARCH_PLAN_SIZE_EXTRA_LARGE optional Example: `OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED` `tags` array of string optional Example: `["example string"]` Tags to organize your knowledge base. `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` The VPC to deploy the knowledge base database in ##### Request: `/v2/gen-ai/knowledge_bases` ### Payload Content type `application/json` ```json { "database_id": "\"12345678-1234-1234-1234-123456789012\"", "datasources": [ { "bucket_name": "example name", "bucket_region": "example string", "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "item_path": "example string" } ], "embedding_model_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"My Knowledge Base\"", "project_id": "\"12345678-1234-1234-1234-123456789012\"", "region": "\"tor1\"", "reranking_config": { "enabled": true, "model": "\"bge-reranker-v2-m3\"" }, "size": "OPEN_SEARCH_PLAN_SIZE_UNSPECIFIED", "tags": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases" \ -d '{ "name": "kb-api-create", "embedding_model_uuid": "05700391-7aa8-11ef-bf8f-4e013e2ddde4", "project_id": "37455431-84bd-4fa2-94cf-e8486f8f8c5e", "tags": [ "tag1" ], "database_id": "abf1055a-745d-4c24-a1db-1959ea819264", "datasources": [ { "spaces_data_source": { "bucket_name": "test-public-gen-ai", "region": "tor1" }, "chunking_algorithm": "CHUNKING_ALGORITHM_HIERARCHICAL", "chunking_options": { "parent_chunk_size": 1000, "child_chunk_size": 350 } }, { "web_crawler_data_source": { "base_url": "https://example.com", "crawling_option": "SCOPED", "embed_media": false, "exclude_tags": ["nav","footer","header","aside","script","style","form","iframe", "noscript"] }, "chunking_algorithm": "CHUNKING_ALGORITHM_SEMANTIC", "chunking_options": { "max_chunk_size": 500, "semantic_threshold": 0.6 } }, { "spaces_data_source": { "bucket_name": "test-public-gen-ai-2", "region": "tor1" }, "chunking_algorithm": "CHUNKING_ALGORITHM_FIXED_LENGTH", "chunking_options": { "max_chunk_size": 400 } }, ], "region": "tor1", "vpc_uuid": "f7176e0b-8c5e-4e32-948e-79327e56225a", "reranking_config": { "enabled": true, "model": "bge-reranker-v2-m3" } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_base` object optional Knowledgebase Description **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_base": { "added_to_agent_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "database_id": "123e4567-e89b-12d3-a456-426614174000", "embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "is_public": true, "last_indexing_job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "project_id": "123e4567-e89b-12d3-a456-426614174000", "region": "example string", "reranking_config": { "enabled": true, "model": "\"bge-reranker-v2-m3\"" }, "tags": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Presigned URLs for Data Source File Upload `/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls` To create presigned URLs for knowledge base data source file upload, send a POST request to `/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls`. #### Request Body: `application/json` `files` array of object optional A list of files to generate presigned URLs for. **Show child properties** `file_name` string optional Example: `example name` Local filename `file_size` string (int64) optional Example: `12345` The size of the file in bytes. ##### Request: `/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls` ### Payload Content type `application/json` ```json { "files": [ { "file_name": "example name", "file_size": "12345" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/data_sources/file_upload_presigned_urls" \ -d '{ "files": [{ "file_name": "dataset.csv", "file_size": 2048 }] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `request_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The ID generated for the request for Presigned URLs. `uploads` array of object optional A list of generated presigned URLs and object keys, one per file. **Show child properties** `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the url expires at. `object_key` string optional Example: `example string` The unique object key to store the file as. `original_file_name` string optional Example: `example name` The original file name. `presigned_url` string optional Example: `example string` The actual presigned URL the client can use to upload the file directly. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "request_id": "123e4567-e89b-12d3-a456-426614174000", "uploads": [ { "expires_at": "2023-01-01T00:00:00Z", "object_key": "example string", "original_file_name": "example name", "presigned_url": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Data Sources for a Knowledge Base `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources` To list all data sources for a knowledge base, send a GET request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources`. #### Path Parameters `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9758a232-b351-11ef-bf8f-4e013e2ddde4/data_sources" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_base_data_sources` array of object optional The data sources **Show child properties** `aws_data_source` object optional AWS S3 Data Source for Display **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `bucket_name` string optional Example: `example name` Name of storage bucket - Deprecated, moved to data_source_details `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `dropbox_data_source` object optional Dropbox Data Source for Display **Show child properties** `folder` string optional Example: `example string` `file_upload_data_source` object optional File to upload as data source for knowledge base. **Show child properties** `original_file_name` string optional Example: `example name` The original file name `size_in_bytes` string (uint64) optional Example: `12345` The size of the file in bytes `stored_object_key` string optional Example: `example string` The object key the file was stored as `google_drive_data_source` object optional Google Drive Data Source for Display **Show child properties** `folder_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `folder_name` string optional Example: `example name` Name of the selected folder if available `item_path` string optional Example: `example string` Path of folder or object in bucket - Deprecated, moved to data_source_details `last_datasource_indexing_job` object optional **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `region` string optional Example: `example string` Region code - Deprecated, moved to data_source_details `spaces_data_source` object optional Spaces Bucket Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of knowledge base `web_crawler_data_source` object optional WebCrawlerDataSource **Show child properties** `base_url` string optional Example: `example string` The base url to crawl. `crawling_option` string (enum) optional Example: `UNKNOWN` Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. `embed_media` boolean optional Example: `true` Whether to ingest and index media (images, etc.) on web pages. `exclude_tags` array of string optional Example: `["example string"]` Declaring which tags to exclude in web pages while webcrawling `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_base_data_sources": [ { "bucket_name": "example name", "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "created_at": "2023-01-01T00:00:00Z", "item_path": "example string", "region": "example string", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Data Source to a Knowledge Base `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources` To add a data source to a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources`. #### Path Parameters `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id #### Request Body: `application/json` `aws_data_source` object optional AWS S3 Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `key_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The AWS Key ID `region` string optional Example: `example string` Region of bucket `secret_key` string optional Example: `example string` The AWS Secret Key `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `knowledge_base_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Knowledge base id `spaces_data_source` object optional Spaces Bucket Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `web_crawler_data_source` object optional WebCrawlerDataSource **Show child properties** `base_url` string optional Example: `example string` The base url to crawl. `crawling_option` string (enum) optional Example: `UNKNOWN` Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. `embed_media` boolean optional Example: `true` Whether to ingest and index media (images, etc.) on web pages. `exclude_tags` array of string optional Example: `["example string"]` Declaring which tags to exclude in web pages while webcrawling ##### Request: `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources` ### Payload Content type `application/json` ```json { "aws_data_source": { "bucket_name": "example name", "item_path": "example string", "key_id": "123e4567-e89b-12d3-a456-426614174000", "region": "example string", "secret_key": "example string" }, "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "chunking_options": { "child_chunk_size": 350, "max_chunk_size": 750, "parent_chunk_size": 1000, "semantic_threshold": 0.5 }, "knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\"", "spaces_data_source": { "bucket_name": "example name", "item_path": "example string", "region": "example string" }, "web_crawler_data_source": { "base_url": "example string", "crawling_option": "UNKNOWN", "embed_media": true, "exclude_tags": [ "example string" ] } } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/20cd8434-6ea1-11f0-bf8f-4e013e2ddde4/data_sources" \ -d '{ "knowledge_base_uuid": "20cd8434-6ea1-11f0-bf8f-4e013e2ddde4", "web_crawler_data_source": { "base_url": "https://example.com", "crawling_option": "SCOPED", "embed_media": false, "exclude_tags": ["nav","footer","header","aside","script","style","form","iframe", "noscript"] }, "chunking_algorithm": "CHUNKING_ALGORITHM_SECTION_BASED", "chunking_options": { "max_chunk_size": 500 } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_base_data_source` object optional Data Source configuration for Knowledge Bases **Show child properties** `aws_data_source` object optional AWS S3 Data Source for Display **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `bucket_name` string optional Example: `example name` Name of storage bucket - Deprecated, moved to data_source_details `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `dropbox_data_source` object optional Dropbox Data Source for Display **Show child properties** `folder` string optional Example: `example string` `file_upload_data_source` object optional File to upload as data source for knowledge base. **Show child properties** `original_file_name` string optional Example: `example name` The original file name `size_in_bytes` string (uint64) optional Example: `12345` The size of the file in bytes `stored_object_key` string optional Example: `example string` The object key the file was stored as `google_drive_data_source` object optional Google Drive Data Source for Display **Show child properties** `folder_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `folder_name` string optional Example: `example name` Name of the selected folder if available `item_path` string optional Example: `example string` Path of folder or object in bucket - Deprecated, moved to data_source_details `last_datasource_indexing_job` object optional **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `region` string optional Example: `example string` Region code - Deprecated, moved to data_source_details `spaces_data_source` object optional Spaces Bucket Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of knowledge base `web_crawler_data_source` object optional WebCrawlerDataSource **Show child properties** `base_url` string optional Example: `example string` The base url to crawl. `crawling_option` string (enum) optional Example: `UNKNOWN` Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. `embed_media` boolean optional Example: `true` Whether to ingest and index media (images, etc.) on web pages. `exclude_tags` array of string optional Example: `["example string"]` Declaring which tags to exclude in web pages while webcrawling **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_base_data_source": { "aws_data_source": { "bucket_name": "example name", "item_path": "example string", "region": "example string" }, "bucket_name": "example name", "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "chunking_options": { "child_chunk_size": 350, "max_chunk_size": 750, "parent_chunk_size": 1000, "semantic_threshold": 0.5 }, "created_at": "2023-01-01T00:00:00Z", "dropbox_data_source": { "folder": "example string" }, "file_upload_data_source": { "original_file_name": "example name", "size_in_bytes": "12345", "stored_object_key": "example string" }, "google_drive_data_source": { "folder_id": "123e4567-e89b-12d3-a456-426614174000", "folder_name": "example name" }, "item_path": "example string", "last_datasource_indexing_job": { "completed_at": "2023-01-01T00:00:00Z", "data_source_uuid": "123e4567-e89b-12d3-a456-426614174000", "error_details": "example string", "error_msg": "example string", "failed_item_count": "12345", "indexed_file_count": "12345", "indexed_item_count": "12345", "removed_item_count": "12345", "skipped_item_count": "12345", "started_at": "2023-01-01T00:00:00Z", "status": "DATA_SOURCE_STATUS_UNKNOWN", "total_bytes": "12345", "total_bytes_indexed": "12345", "total_file_count": "12345" }, "region": "example string", "spaces_data_source": { "bucket_name": "example name", "item_path": "example string", "region": "example string" }, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000", "web_crawler_data_source": { "base_url": "example string", "crawling_option": "UNKNOWN", "embed_media": true, "exclude_tags": [ "example string" ] } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Data Source options `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}` To update a data source (e.g. chunking options), send a PUT request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}`. #### Path Parameters `knowledge_base_uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge Base ID (Path Parameter) `data_source_uuid` string required Example: `123e4567-e89b-12d3-a456-426614174000` Data Source ID (Path Parameter) #### Request Body: `application/json` `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `data_source_uuid` string optional Example: `"98765432-1234-1234-1234-123456789012"` Data Source ID (Path Parameter) `knowledge_base_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Knowledge Base ID (Path Parameter) ##### Request: `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}` ### Payload Content type `application/json` ```json { "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "chunking_options": { "child_chunk_size": 350, "max_chunk_size": 750, "parent_chunk_size": 1000, "semantic_threshold": 0.5 }, "data_source_uuid": "\"98765432-1234-1234-1234-123456789012\"", "knowledge_base_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/12345678-1234-1234-1234-123456789012/data_sources/98765432-1234-1234-1234-123456789012" \ -d '{ "chunking_algorithm": "CHUNKING_ALGORITHM_SECTION_BASED", "chunking_options": { "max_chunk_size": 500 } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_base_data_source` object optional Data Source configuration for Knowledge Bases **Show child properties** `aws_data_source` object optional AWS S3 Data Source for Display **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `bucket_name` string optional Example: `example name` Name of storage bucket - Deprecated, moved to data_source_details `chunking_algorithm` string, one of: CHUNKING_ALGORITHM_UNKNOWN, CHUNKING_ALGORITHM_SECTION_BASED, CHUNKING_ALGORITHM_HIERARCHICAL, CHUNKING_ALGORITHM_SEMANTIC, CHUNKING_ALGORITHM_FIXED_LENGTH optional Example: `CHUNKING_ALGORITHM_UNKNOWN` `chunking_options` object optional **Show child properties** `child_chunk_size` integer (int64) optional Example: `350` `max_chunk_size` integer (int64) optional Example: `750` Common options `parent_chunk_size` integer (int64) optional Example: `1000` Hierarchical options `semantic_threshold` number (float) optional Example: `0.5` Semantic options `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `dropbox_data_source` object optional Dropbox Data Source for Display **Show child properties** `folder` string optional Example: `example string` `file_upload_data_source` object optional File to upload as data source for knowledge base. **Show child properties** `original_file_name` string optional Example: `example name` The original file name `size_in_bytes` string (uint64) optional Example: `12345` The size of the file in bytes `stored_object_key` string optional Example: `example string` The object key the file was stored as `google_drive_data_source` object optional Google Drive Data Source for Display **Show child properties** `folder_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `folder_name` string optional Example: `example name` Name of the selected folder if available `item_path` string optional Example: `example string` Path of folder or object in bucket - Deprecated, moved to data_source_details `last_datasource_indexing_job` object optional **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `region` string optional Example: `example string` Region code - Deprecated, moved to data_source_details `spaces_data_source` object optional Spaces Bucket Data Source **Show child properties** `bucket_name` string optional Example: `example name` Spaces bucket name `item_path` string optional Example: `example string` `region` string optional Example: `example string` Region of bucket `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of knowledge base `web_crawler_data_source` object optional WebCrawlerDataSource **Show child properties** `base_url` string optional Example: `example string` The base url to crawl. `crawling_option` string (enum) optional Example: `UNKNOWN` Options for specifying how URLs found on pages should be handled. - UNKNOWN: Default unknown value - SCOPED: Only include the base URL. - PATH: Crawl the base URL and linked pages within the URL path. - DOMAIN: Crawl the base URL and linked pages within the same domain. - SUBDOMAINS: Crawl the base URL and linked pages for any subdomain. - SITEMAP: Crawl URLs discovered in the sitemap. `embed_media` boolean optional Example: `true` Whether to ingest and index media (images, etc.) on web pages. `exclude_tags` array of string optional Example: `["example string"]` Declaring which tags to exclude in web pages while webcrawling **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_base_data_source": { "aws_data_source": { "bucket_name": "example name", "item_path": "example string", "region": "example string" }, "bucket_name": "example name", "chunking_algorithm": "CHUNKING_ALGORITHM_UNKNOWN", "chunking_options": { "child_chunk_size": 350, "max_chunk_size": 750, "parent_chunk_size": 1000, "semantic_threshold": 0.5 }, "created_at": "2023-01-01T00:00:00Z", "dropbox_data_source": { "folder": "example string" }, "file_upload_data_source": { "original_file_name": "example name", "size_in_bytes": "12345", "stored_object_key": "example string" }, "google_drive_data_source": { "folder_id": "123e4567-e89b-12d3-a456-426614174000", "folder_name": "example name" }, "item_path": "example string", "last_datasource_indexing_job": { "completed_at": "2023-01-01T00:00:00Z", "data_source_uuid": "123e4567-e89b-12d3-a456-426614174000", "error_details": "example string", "error_msg": "example string", "failed_item_count": "12345", "indexed_file_count": "12345", "indexed_item_count": "12345", "removed_item_count": "12345", "skipped_item_count": "12345", "started_at": "2023-01-01T00:00:00Z", "status": "DATA_SOURCE_STATUS_UNKNOWN", "total_bytes": "12345", "total_bytes_indexed": "12345", "total_file_count": "12345" }, "region": "example string", "spaces_data_source": { "bucket_name": "example name", "item_path": "example string", "region": "example string" }, "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000", "web_crawler_data_source": { "base_url": "example string", "crawling_option": "UNKNOWN", "embed_media": true, "exclude_tags": [ "example string" ] } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Data Source from a Knowledge Base `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}` To delete a data source from a knowledge base, send a DELETE request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}`. #### Path Parameters `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id `data_source_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Data source id ##### Request: `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/data_sources/{data_source_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9a6e3975-b0c6-11ef-bf8f-4e013e2ddde4/data_sources/bd2a2db5-b8b0-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Data source id `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "data_source_uuid": "123e4567-e89b-12d3-a456-426614174000", "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Indexing Jobs for a Knowledge Base `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs` To list latest 15 indexing jobs for a knowledge base, send a GET request to `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs`. #### Path Parameters `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base uuid in string ##### Request: `/v2/gen-ai/knowledge_bases/{knowledge_base_uuid}/indexing_jobs` ### cURL ```bash curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/knowledge_bases/1139121f-a860-11f0-b542-ca68c578b04b/indexing_jobs' \ --header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \ --header 'Content-Type: application/json' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `jobs` array of object optional The indexing jobs **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "jobs": [ { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Information About an Existing Knowledge Base `/v2/gen-ai/knowledge_bases/{uuid}` To retrive information about an existing knowledge base, send a GET request to `/v2/gen-ai/knowledge_bases/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id ##### Request: `/v2/gen-ai/knowledge_bases/{uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/9758a232-b351-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `database_status` string (enum) optional Example: `CREATING` `knowledge_base` object optional Knowledgebase Description **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "database_status": "CREATING", "knowledge_base": { "added_to_agent_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "database_id": "123e4567-e89b-12d3-a456-426614174000", "embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "is_public": true, "last_indexing_job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "project_id": "123e4567-e89b-12d3-a456-426614174000", "region": "example string", "reranking_config": { "enabled": true, "model": "\"bge-reranker-v2-m3\"" }, "tags": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Knowledge Base `/v2/gen-ai/knowledge_bases/{uuid}` To update a knowledge base, send a PUT request to `/v2/gen-ai/knowledge_bases/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id #### Request Body: `application/json` `database_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` The id of the DigitalOcean database this knowledge base will use, optional. `name` string optional Example: `"My Knowledge Base"` Knowledge base name `project_id` string optional Example: `"12345678-1234-1234-1234-123456789012"` The id of the DigitalOcean project this knowledge base will belong to `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize your knowledge base. `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Knowledge base id ##### Request: `/v2/gen-ai/knowledge_bases/{uuid}` ### Payload Content type `application/json` ```json { "database_id": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"My Knowledge Base\"", "project_id": "\"12345678-1234-1234-1234-123456789012\"", "reranking_config": { "enabled": true, "model": "\"bge-reranker-v2-m3\"" }, "tags": [ "example string" ], "uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/e51dba65-cf7a-11ef-bf8f-4e013e2ddde4" \ -d '{ "uuid": "e51dba65-cf7a-11ef-bf8f-4e013e2ddde4", "name": "kb-api-rename", "reranking_config": { "enabled": true, "model": "bge-reranker-v2-m3" } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `knowledge_base` object optional Knowledgebase Description **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job **Show child properties** `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source completed indexing `data_source_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the indexed data source `error_details` string optional Example: `example string` A detailed error description `error_msg` string optional Example: `example string` A string code provinding a hint which part of the system experienced an error `failed_item_count` string (uint64) optional Example: `12345` Total count of files that have failed `indexed_file_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `indexed_item_count` string (uint64) optional Example: `12345` Total count of files that have been indexed `removed_item_count` string (uint64) optional Example: `12345` Total count of files that have been removed `skipped_item_count` string (uint64) optional Example: `12345` Total count of files that have been skipped `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when data source started indexing `status` string (enum) optional Example: `DATA_SOURCE_STATUS_UNKNOWN` `total_bytes` string (uint64) optional Example: `12345` Total size of files in data source in bytes `total_bytes_indexed` string (uint64) optional Example: `12345` Total size of files in data source in bytes that have been indexed `total_file_count` string (uint64) optional Example: `12345` Total file count in the data source `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "knowledge_base": { "added_to_agent_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "database_id": "123e4567-e89b-12d3-a456-426614174000", "embedding_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "is_public": true, "last_indexing_job": { "completed_datasources": 123, "created_at": "2023-01-01T00:00:00Z", "data_source_jobs": [], "data_source_uuids": [ "example string" ], "finished_at": "2023-01-01T00:00:00Z", "is_report_available": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "phase": "BATCH_JOB_PHASE_UNKNOWN", "started_at": "2023-01-01T00:00:00Z", "status": "INDEX_JOB_STATUS_UNKNOWN", "tokens": 123, "total_datasources": 123, "total_tokens": "12345", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" }, "name": "example name", "project_id": "123e4567-e89b-12d3-a456-426614174000", "region": "example string", "reranking_config": { "enabled": true, "model": "\"bge-reranker-v2-m3\"" }, "tags": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Knowledge Base `/v2/gen-ai/knowledge_bases/{uuid}` To delete a knowledge base, send a DELETE request to `/v2/gen-ai/knowledge_bases/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Knowledge base id ##### Request: `/v2/gen-ai/knowledge_bases/{uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/knowledge_bases/8241f44e-b0da-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The id of the deleted knowledge base **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Presigned URLs for Model Evaluation Dataset File Upload `/v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls` To create presigned URLs for model evaluation dataset file upload, send a POST request to `/v2/genai/model_evaluation/datasets/file_upload_presigned_urls`. #### Request Body: `application/json` `files` array of object optional A list of files to generate presigned URLs for. **Show child properties** `file_name` string optional Example: `example name` Local filename `file_size` string (int64) optional Example: `12345` The size of the file in bytes. ##### Request: `/v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls` ### Payload Content type `application/json` ```json { "files": [ { "file_name": "example name", "file_size": "12345" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation/datasets/file_upload_presigned_urls" \ -d '{ "files": [{ "file_name": "dataset.jsonl", "file_size": 2048 }] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `request_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The ID generated for the request for Presigned URLs. `uploads` array of object optional A list of generated presigned URLs and object keys, one per file. **Show child properties** `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the url expires at. `object_key` string optional Example: `example string` The unique object key to store the file as. `original_file_name` string optional Example: `example name` The original file name. `presigned_url` string optional Example: `example string` The actual presigned URL the client can use to upload the file directly. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "request_id": "123e4567-e89b-12d3-a456-426614174000", "uploads": [ { "expires_at": "2023-01-01T00:00:00Z", "object_key": "example string", "original_file_name": "example name", "presigned_url": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Evaluation Metrics `/v2/gen-ai/model_evaluation_metrics` To list all available metrics for model evaluation, send a GET request to `/v2/genai/model_evaluation_metrics`. #### Query Parameters `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_MULTI_TURN` When set, only return metrics compatible with this turn type. Default: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` ##### Request: `/v2/gen-ai/model_evaluation_metrics` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_metrics" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `metrics` array of object optional List of model evaluation metrics **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "metrics": [ { "associated_presets": [], "category": "METRIC_CATEGORY_UNSPECIFIED", "description": "example string", "evaluation_scope": "EVALUATION_SCOPE_UNSPECIFIED", "inverted": true, "is_metric_goal": true, "metric_name": "example name", "metric_rank": 123, "metric_type": "METRIC_TYPE_UNSPECIFIED", "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED", "range_max": 123, "range_min": 123, "source": "EVALUATION_METRIC_SOURCE_UNSPECIFIED", "turn_type": "EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Evaluation Presets `/v2/gen-ai/model_evaluation_presets` To list all saved model evaluation presets, send a GET request to `/v2/genai/model_evaluation_presets`. ##### Request: `/v2/gen-ai/model_evaluation_presets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_presets" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `presets` array of object optional List of explicitly saved evaluation presets (reusable configs). **Show child properties** `candidate_inference_config` object optional Inference configuration for the candidate model during evaluation. The output token limit is set automatically and cannot be configured. **Show child properties** `reasoning_effort` string optional Example: `low` Reasoning effort for reasoning-capable models (e.g. "low", "medium", "high"). Validated against the candidate model's supported values; a model that advertises none rejects this field. `stop_token` string optional Example: `example string` `system_prompt` string optional Example: `example string` `temperature` number (float) optional Example: `123` `candidate_model_name` string optional Example: `example name` Model slug used to call the candidate model API. Empty when the CANDIDATE section was not saved. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model stored on this preset. Empty when the CANDIDATE section was not saved. For DEDICATED candidates this is the dedicated inference deployment UUID. `candidate_system_prompt` string optional Example: `2023-01-01` System prompt / instructions to send to the candidate model. Empty when the SYSTEM_PROMPT section was not saved (check `saved_sections`). `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the preset was created. `dataset_name` string optional Example: `example name` Display name of the dataset stored on this preset. Empty when the DATASET section was not saved or the dataset no longer exists. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset stored on this preset. Empty when the DATASET section was not saved (check `saved_sections`). `eval_preset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation preset. `judge_model_name` string optional Example: `example name` Display name of the judge model stored on this preset. Empty when the JUDGE section was not saved or the model no longer exists. `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the judge model stored on this preset. Empty when the JUDGE section was not saved (check `saved_sections`). `metrics` array of object optional Metrics selected for this preset. Empty when the METRICS section was not saved. **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` Name of the evaluation preset. `saved_sections` array of string (enum) optional Example: `["PRESET_SAVE_SECTION_CANDIDATE","PRESET_SAVE_SECTION_METRICS"]` Sections of the inline evaluation config that were persisted when this preset was created. Use this to tell "section was saved with an empty value" apart from "section was not saved" — scalar fields like `dataset_uuid` or `candidate_system_prompt` are always emitted as the empty string when the section was not saved. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "presets": [ { "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "candidate_system_prompt": "2023-01-01", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "metrics": [], "name": "example name", "saved_sections": [ "PRESET_SAVE_SECTION_CANDIDATE", "PRESET_SAVE_SECTION_METRICS" ] } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Model Evaluation Preset `/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}` To retrieve a saved model evaluation preset, send a GET request to `/v2/genai/model_evaluation_presets/{eval_preset_uuid}`. #### Path Parameters `eval_preset_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation preset. ##### Request: `/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_presets/123e4567-e89b-12d3-a456-426614174000" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `preset` object optional Model Evaluation Preset - a saved, reusable configuration for model evaluation runs. Each section (dataset, judge, metrics, candidate, system prompt) is independent and may be empty; sections the preset omits must be supplied inline on the run that references it. Use `saved_sections` to tell "section saved with empty value" apart from "section not saved at all" — each section's scalar fields are left empty when the section was not saved. **Show child properties** `candidate_inference_config` object optional Inference configuration for the candidate model during evaluation. The output token limit is set automatically and cannot be configured. **Show child properties** `reasoning_effort` string optional Example: `low` Reasoning effort for reasoning-capable models (e.g. "low", "medium", "high"). Validated against the candidate model's supported values; a model that advertises none rejects this field. `stop_token` string optional Example: `example string` `system_prompt` string optional Example: `example string` `temperature` number (float) optional Example: `123` `candidate_model_name` string optional Example: `example name` Model slug used to call the candidate model API. Empty when the CANDIDATE section was not saved. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model stored on this preset. Empty when the CANDIDATE section was not saved. For DEDICATED candidates this is the dedicated inference deployment UUID. `candidate_system_prompt` string optional Example: `2023-01-01` System prompt / instructions to send to the candidate model. Empty when the SYSTEM_PROMPT section was not saved (check `saved_sections`). `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the preset was created. `dataset_name` string optional Example: `example name` Display name of the dataset stored on this preset. Empty when the DATASET section was not saved or the dataset no longer exists. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset stored on this preset. Empty when the DATASET section was not saved (check `saved_sections`). `eval_preset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation preset. `judge_model_name` string optional Example: `example name` Display name of the judge model stored on this preset. Empty when the JUDGE section was not saved or the model no longer exists. `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the judge model stored on this preset. Empty when the JUDGE section was not saved (check `saved_sections`). `metrics` array of object optional Metrics selected for this preset. Empty when the METRICS section was not saved. **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` Name of the evaluation preset. `saved_sections` array of string (enum) optional Example: `["PRESET_SAVE_SECTION_CANDIDATE","PRESET_SAVE_SECTION_METRICS"]` Sections of the inline evaluation config that were persisted when this preset was created. Use this to tell "section was saved with an empty value" apart from "section was not saved" — scalar fields like `dataset_uuid` or `candidate_system_prompt` are always emitted as the empty string when the section was not saved. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "preset": { "candidate_inference_config": { "reasoning_effort": "low", "stop_token": "example string", "system_prompt": "example string", "temperature": 123 }, "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "candidate_system_prompt": "2023-01-01", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "metrics": [], "name": "example name", "saved_sections": [ "PRESET_SAVE_SECTION_CANDIDATE", "PRESET_SAVE_SECTION_METRICS" ], "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Model Evaluation Preset `/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}` To delete a saved model evaluation preset, send a DELETE request to `/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}`. #### Path Parameters `eval_preset_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation preset to delete. ##### Request: `/v2/gen-ai/model_evaluation_presets/{eval_preset_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_presets/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Evaluation Runs `/v2/gen-ai/model_evaluation_runs` To list model evaluation runs, send a GET request to `/v2/genai/model_evaluation_runs`. #### Query Parameters `eval_preset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation preset to filter by. `status` string (enum) optional Example: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Filter by evaluation run status. Default: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `statuses` array of string (enum) optional Example: `["MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED"]` Filter by one or more statuses. Empty means no status filter. `candidate_types` array of string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER optional Example: `["CANDIDATE_MODEL_SOURCE_SERVERLESS"]` Filter by one or more candidate model source types (serverless, dedicated, router). Empty means no candidate-type filter. `search` string optional Example: `example string` Free-text search across the eval run name, candidate model name and dataset name (case-insensitive substring match). Empty means no search. `sort_by` string, one of: MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED, MODEL_EVALUATION_RUN_SORT_FIELD_CREATED_AT, MODEL_EVALUATION_RUN_SORT_FIELD_STATUS optional Example: `MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to creation date when unspecified. Default: `MODEL_EVALUATION_RUN_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to descending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/model_evaluation_runs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_candidate_types` array of string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Full set of candidate model source types the FE can offer in the candidate-type filter UI. `available_statuses` array of string (enum) optional Full set of statuses the FE can offer in the status filter UI. Returned on every list call so clients never need to hardcode the enum values. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `runs` array of object optional Summary view of evaluation runs for the run history list. **Show child properties** `candidate_model_name` string optional Example: `example name` Name of the candidate model being evaluated. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model being evaluated. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the run was created. `dataset_name` string optional Example: `example name` Name of the dataset used for evaluation. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset used for evaluation. `eval_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run. `judge_model_name` string optional Example: `example name` `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Judge model used to score responses. `name` string optional Example: `example name` Name of the evaluation run. `progress` object optional Per-phase progress for a model evaluation run. The candidate phase invokes the candidate model once per dataset row; the judge phase scores each candidate-success row with the configured metrics. Counts grow as the run advances; compare against total_rows to render a progress bar. **Show child properties** `candidate_rows_evaluated` integer (int64) optional Example: `100` Dataset rows whose candidate model call has completed (success or failure). `judge_rows_evaluated` integer (int64) optional Example: `95` Candidate-success rows the judge has finished (scored or skipped). Caps at the number of candidate successes, which may be below total_rows. `total_rows` integer (int64) optional Example: `100` Total dataset rows for the run, sourced from the evaluation dataset. `status` string (enum) optional Example: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Model Evaluation Run Statuses **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_candidate_types": [ "CANDIDATE_MODEL_SOURCE_SERVERLESS" ], "available_statuses": [ "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "runs": [ { "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Model Evaluation Run `/v2/gen-ai/model_evaluation_runs` To create a model evaluation run, send a POST request to `/v2/genai/model_evaluation_runs`. #### Request Body: `application/json` `candidate_inference_config` object optional Inference configuration for the candidate model during evaluation. The output token limit is set automatically and cannot be configured. **Show child properties** `reasoning_effort` string optional Example: `low` Reasoning effort for reasoning-capable models (e.g. "low", "medium", "high"). Validated against the candidate model's supported values; a model that advertises none rejects this field. `stop_token` string optional Example: `example string` `system_prompt` string optional Example: `example string` `temperature` number (float) optional Example: `123` `candidate_model_name` string optional Example: `example name` Model slug used to call the candidate model API. For dedicated inference, this is the model slug from the deployment. For serverless, this should match the model's internal name. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model to evaluate. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset to use for evaluation. `epochs` integer (int64) optional Example: `1` How many times each dataset row is evaluated. Defaults to 1, maximum 10. When more than 1, the results show how consistent the model is across attempts (avg@k, pass@k, cons@k). Each extra attempt makes the run take longer. Not saved in presets. `eval_preset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the judge model used to score responses. `metric_uuids` array of string optional Example: `["example string"]` UUIDs of metrics to evaluate (selected from ListModelEvaluationMetrics). `name` string optional Example: `example name` `preset_name` string optional Example: `example name` `preset_save_sections` array of string (enum) optional Example: `["PRESET_SAVE_SECTION_CANDIDATE","PRESET_SAVE_SECTION_METRICS"]` Which sections of this run's resolved configuration to persist as a reusable preset. Each selected section saves only its own fields; the remaining sections stay empty on the preset and must be supplied inline on future runs that reference it. Empty means do not save a preset (unless the deprecated `save_as_preset` boolean is true, in which case all sections are saved). Ignored when `eval_preset_uuid` is set. Use `preset_name` to label the saved preset. `save_as_preset` boolean optional Example: `true` Deprecated: use `preset_save_sections`. When `true` and `preset_save_sections` is empty, all five sections of the resolved configuration are saved as a reusable preset (legacy behavior). Ignored when `eval_preset_uuid` is set. `source` string optional Example: `example string` Source of the run creation (api, sdk, cli). `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. ##### Request: `/v2/gen-ai/model_evaluation_runs` ### Payload Content type `application/json` ```json { "candidate_inference_config": { "reasoning_effort": "low", "stop_token": "example string", "system_prompt": "example string", "temperature": 123 }, "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "epochs": 1, "eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "metric_uuids": [ "example string" ], "name": "example name", "preset_name": "example name", "preset_save_sections": [ "PRESET_SAVE_SECTION_CANDIDATE", "PRESET_SAVE_SECTION_METRICS" ], "save_as_preset": true, "source": "example string", "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 } } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs" \ -d '{ "name": "my-evaluation-run", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_uuid": "223e4567-e89b-12d3-a456-426614174001", "dataset_uuid": "323e4567-e89b-12d3-a456-426614174002", "metric_uuids": [ "423e4567-e89b-12d3-a456-426614174003" ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `eval_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the created evaluation run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Model Evaluation Run `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` To retrieve a model evaluation run, send a GET request to `/v2/genai/model_evaluation_runs/{eval_run_uuid}`. #### Path Parameters `eval_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation run. #### Query Parameters `page` integer optional Example: `1` Page number for per-prompt results (defaults to 1). `per_page` integer optional Example: `1` Number of per-prompt results per page (defaults to 50). ##### Request: `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/123e4567-e89b-12d3-a456-426614174000" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `results` array of object optional Paginated per-prompt evaluation results. **Show child properties** `candidate_model_name` string optional Example: `example name` `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `candidate_routed_task` string optional Example: `Coding & brainstorming` `epoch` integer (int64) optional Example: `1` Which pass over this dataset row produced this result, 1-indexed (1 = first pass). Always 0 (and omitted from JSON) when the run's epochs is 1 (the default) — per-attempt epoch numbering doesn't apply to single-pass runs. When epochs > 1, this always reflects epoch 1 (see epoch_results below). `epoch_results` object optional Present only when the run's epochs > 1: every pass over this row — including epoch 1, duplicated here for convenience — keyed by 1-indexed "epoch1"/"epoch2"/"epoch3" labels. Mirrors the shape of the downloadable results file's epochResults object. The top-level fields above (output, metric_results, candidate_routed_task) always reflect epoch 1, so single-epoch clients reading only those fields see no difference when epochs > 1. **Show child properties** `(additional properties)` object optional Additional properties are allowed. `ground_truth` string optional Example: `example string` `input` string optional Example: `example string` The input query sent to the candidate model. `metric_results` array of object optional Per-metric scores and judge reasoning for this prompt. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `output` string optional Example: `example string` The response from the candidate model. `row_number` integer (int64) optional Example: `1` Which dataset row this result came from. Multiple results share a row_number when epochs > 1: one per pass over that row. `run` object optional Model Evaluation Run Detail - full view returned when fetching a specific run. **Show child properties** `candidate_inference_config` object optional Inference configuration for the candidate model during evaluation. The output token limit is set automatically and cannot be configured. **Show child properties** `reasoning_effort` string optional Example: `low` Reasoning effort for reasoning-capable models (e.g. "low", "medium", "high"). Validated against the candidate model's supported values; a model that advertises none rejects this field. `stop_token` string optional Example: `example string` `system_prompt` string optional Example: `example string` `temperature` number (float) optional Example: `123` `candidate_model_name` string optional Example: `example name` `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Candidate model being evaluated. `completed_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Dataset used for the evaluation. `epochs` integer (int64) optional Example: `1` Number of times each dataset row is evaluated (n-pass/epochs). 1 by default. Drives the avg@k/pass@k/cons@k aggregation in result_summary. `error_description` string optional Example: `example string` Error description if the run failed or partially succeeded. `eval_preset_name` string optional Example: `example name` `eval_preset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `eval_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run. `judge_model_name` string optional Example: `example name` `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Judge model used to score responses. `metrics` array of object optional Metrics selected for this evaluation. **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` Name of the evaluation run. `progress` object optional Per-phase progress for a model evaluation run. The candidate phase invokes the candidate model once per dataset row; the judge phase scores each candidate-success row with the configured metrics. Counts grow as the run advances; compare against total_rows to render a progress bar. **Show child properties** `candidate_rows_evaluated` integer (int64) optional Example: `100` Dataset rows whose candidate model call has completed (success or failure). `judge_rows_evaluated` integer (int64) optional Example: `95` Candidate-success rows the judge has finished (scored or skipped). Caps at the number of candidate successes, which may be below total_rows. `total_rows` integer (int64) optional Example: `100` Total dataset rows for the run, sourced from the evaluation dataset. `result_summary` object optional Aggregated result summary for a completed model evaluation run. **Show child properties** `end_time` string (date-time) optional Example: `2023-01-01T00:00:00Z` `epoch_summary` object optional Aggregation across epochs when a run repeats each dataset row k times. Only populated when epochs > 1; at epochs == 1 every number here would equal overall_score_percent, so it is omitted rather than duplicated. **Show child properties** `avg_at_k_percent` number (double) optional Example: `123` Mean over rows of (passing epochs / scored epochs) for the star metric. Equals overall_score_percent; this is the primary result for a multi-epoch run ("how often does it work"). `cons_at_k_percent` number (double) optional Example: `123` Fraction of rows where a strict majority of scored epochs passed ("what does the model typically answer"). An even-k tie counts as fail. `epochs` integer (int64) optional Example: `123` Number of passes per dataset row (k). `pass_at_k_percent` number (double) optional Example: `123` Unbiased estimate of the probability that at least one of k epochs passes ("can it work at all, given retries"). Always the most generous of the three. `per_epoch` array of object optional Each epoch's own standalone score, persisted next to the aggregate. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `rows_excluded` integer (int64) optional Example: `123` Rows where every epoch failed or was skipped, so the row contributes to no score. Not a random sample of difficulty — surface this explicitly. `rows_scored` integer (int64) optional Example: `123` Rows with at least one scored epoch. The effective N behind every percentage above; always display alongside them. `score_stddev_percent` number (double) optional Example: `123` Population standard deviation of the k per-epoch scores below — the signal for whether a difference between runs is real or noise. `epochs` integer (int64) optional Example: `1` Number of times each dataset row was evaluated (n-pass/epochs). Mirrors ModelEvaluationRunDetail.epochs. 1 for every existing run. `metric_summaries` array of object optional Per-metric aggregated pass/fail statistics. **Show child properties** `avg_at_k_percent` number (double) optional Example: `123` Row-level (not attempt-level) aggregation across epochs for this metric, mirroring EpochResultSummary but scoped to one metric. Only set when the run's epochs > 1; pass_percent/pass_count/etc. above stay attempt-level (over row x epoch pairs) so they don't desynchronize from the counts sitting next to them. `cons_at_k_percent` number (double) optional Example: `123` `description` string optional Example: `example string` `fail_count` integer (int64) optional Example: `123` Rows where the metric failed to score or completed below the threshold. `fail_percent` number (double) optional Example: `123` `metric_name` string optional Example: `example name` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `pass_at_k_percent` number (double) optional Example: `123` `pass_count` integer (int64) optional Example: `123` Rows where the metric completed and passed the configured threshold. `pass_percent` number (double) optional Example: `123` `skip_percent` number (double) optional Example: `123` Percentage of rows that were skipped for this metric, computed as skipped_count divided by the total rows the metric saw (pass_count + fail_count + skipped_count). `skipped_count` integer (int64) optional Example: `123` Rows where the metric was not evaluated for this prompt. `overall_score_percent` number (double) optional Example: `123` `per_model_summaries` object optional Per-model breakdown of an evaluation run. Set on router evaluations to show how each underlying model performed across the prompts that were routed to it. **Show child properties** `summaries` array of object optional One entry per underlying model that received at least one prompt during the evaluation run. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `per_task_summaries` object optional Per-task breakdown of an evaluation run. Set on router evaluations to show how each routing task category performed across the prompts that were classified into it. **Show child properties** `summaries` array of object optional One entry per routing task category that received at least one prompt during the evaluation run. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `performance_metrics` object optional All performance metrics are for the candidate model unless noted otherwise. **Show child properties** `candidate_latency` object optional Latency metrics for candidate model invocations (in milliseconds). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `token_usage` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `pricing` object optional Pricing breakdown for an evaluation run. **Show child properties** `currency` string optional Example: `example string` Currency code (e.g., "USD"). `judge_model_pricing` object optional Token pricing breakdown for a single model. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `per_candidate_model_pricing` array of object optional Pricing per candidate model. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_cost` number (double) optional Example: `123` Total cost of the evaluation run (all candidates + judge). `star_metric_summary` object optional Star metric summary with identifying details and threshold. **Show child properties** `metric_name` string optional Example: `example name` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `threshold` number (float) optional Example: `123` `start_time` string (date-time) optional Example: `2023-01-01T00:00:00Z` Run timing. `total_duration_seconds` integer (int64) optional Example: `123` Total wall-clock duration in seconds. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Model Evaluation Run Statuses **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "results": [ { "candidate_model_name": "example name", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "candidate_routed_task": "Coding \u0026 brainstorming", "epoch": 1, "ground_truth": "example string", "input": "example string", "metric_results": [], "output": "example string", "row_number": 1 } ], "run": { "candidate_inference_config": { "reasoning_effort": "low", "stop_token": "example string", "system_prompt": "example string", "temperature": 123 }, "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "completed_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "epochs": 1, "error_description": "example string", "eval_preset_name": "example name", "eval_preset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "metrics": [], "name": "example name", "progress": { "candidate_rows_evaluated": 100, "judge_rows_evaluated": 95, "total_rows": 100 }, "result_summary": { "end_time": "2023-01-01T00:00:00Z", "epochs": 1, "metric_summaries": [], "overall_score_percent": 123, "start_time": "2023-01-01T00:00:00Z", "total_duration_seconds": 123 }, "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 }, "started_at": "2023-01-01T00:00:00Z", "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update Model Evaluation Run `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` To update a model evaluation run's display name, send a PATCH request to `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}`. #### Path Parameters `eval_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the model evaluation run to update. Returned by `CreateModelEvaluationRun` and listed via `ListModelEvaluationRuns`. #### Request Body: `application/json` `eval_run_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` UUID of the model evaluation run to update. Returned by `CreateModelEvaluationRun` and listed via `ListModelEvaluationRuns`. `name` string optional Example: `My evaluation run` Optional new display name for the evaluation run (max 255 characters). ##### Request: `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` ### Payload Content type `application/json` ```json { "eval_run_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "My evaluation run" } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/12345678-1234-1234-1234-123456789012" \ -d '{ "name": "My new evaluation name" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `run` object optional Model Evaluation Run Summary - lightweight view used in run history list. **Show child properties** `candidate_model_name` string optional Example: `example name` Name of the candidate model being evaluated. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model being evaluated. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the run was created. `dataset_name` string optional Example: `example name` Name of the dataset used for evaluation. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset used for evaluation. `eval_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run. `judge_model_name` string optional Example: `example name` `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Judge model used to score responses. `name` string optional Example: `example name` Name of the evaluation run. `progress` object optional Per-phase progress for a model evaluation run. The candidate phase invokes the candidate model once per dataset row; the judge phase scores each candidate-success row with the configured metrics. Counts grow as the run advances; compare against total_rows to render a progress bar. **Show child properties** `candidate_rows_evaluated` integer (int64) optional Example: `100` Dataset rows whose candidate model call has completed (success or failure). `judge_rows_evaluated` integer (int64) optional Example: `95` Candidate-success rows the judge has finished (scored or skipped). Caps at the number of candidate successes, which may be below total_rows. `total_rows` integer (int64) optional Example: `100` Total dataset rows for the run, sourced from the evaluation dataset. `status` string (enum) optional Example: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Model Evaluation Run Statuses **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "run": { "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "progress": { "candidate_rows_evaluated": 100, "judge_rows_evaluated": 95, "total_rows": 100 }, "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Model Evaluation Run `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` To delete a model evaluation run, send a DELETE request to `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}`. The run must be in a terminal status (`successful`, `partially_successful`, `failed`, or `cancelled`). For runs still in progress, either wait for the run to finish or cancel it, then retry the delete once the run reaches a terminal status. #### Path Parameters `eval_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the model evaluation run to delete. The run must be in a terminal status (`successful`, `partially_successful`, `failed`, or `cancelled`). For runs still in progress, either wait for the run to finish or cancel it, then retry the delete. ##### Request: `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `error` string optional Example: `example string` Error message if deletion failed `status` string, one of: DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED, DELETE_MODEL_EVALUATION_RUN_STATUS_SUCCESS, DELETE_MODEL_EVALUATION_RUN_STATUS_FAIL optional Example: `DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Status of delete operation **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "error": "example string", "status": "DELETE_MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Cancel Model Evaluation Run `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel` To cancel an in-progress model evaluation run, send a PUT request to `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel`. #### Path Parameters `eval_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the model evaluation run to cancel. Returned by `CreateModelEvaluationRun` and listed via `ListModelEvaluationRuns`. The run must be in a non-terminal status (queued, running_dataset, or evaluating_results); already-terminal runs return an error. #### Request Body: `application/json` `eval_run_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` UUID of the model evaluation run to cancel. Returned by `CreateModelEvaluationRun` and listed via `ListModelEvaluationRuns`. The run must be in a non-terminal status (queued, running_dataset, or evaluating_results); already-terminal runs return an error. ##### Request: `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/cancel` ### Payload Content type `application/json` ```json { "eval_run_uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/12345678-1234-1234-1234-123456789012/cancel" \ -d '{ "eval_run_uuid": "12345678-1234-1234-1234-123456789012" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `run` object optional Model Evaluation Run Summary - lightweight view used in run history list. **Show child properties** `candidate_model_name` string optional Example: `example name` Name of the candidate model being evaluated. `candidate_model_source` string, one of: CANDIDATE_MODEL_SOURCE_SERVERLESS, CANDIDATE_MODEL_SOURCE_DEDICATED, CANDIDATE_MODEL_SOURCE_ROUTER, CANDIDATE_MODEL_SOURCE_AGENT optional Example: `CANDIDATE_MODEL_SOURCE_SERVERLESS` Whether the candidate is a served model (serverless platform, a dedicated deployment, or a model router) or an OHS-hosted agent config. `candidate_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the candidate model being evaluated. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when the run was created. `dataset_name` string optional Example: `example name` Name of the dataset used for evaluation. `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset used for evaluation. `eval_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run. `judge_model_name` string optional Example: `example name` `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Judge model used to score responses. `name` string optional Example: `example name` Name of the evaluation run. `progress` object optional Per-phase progress for a model evaluation run. The candidate phase invokes the candidate model once per dataset row; the judge phase scores each candidate-success row with the configured metrics. Counts grow as the run advances; compare against total_rows to render a progress bar. **Show child properties** `candidate_rows_evaluated` integer (int64) optional Example: `100` Dataset rows whose candidate model call has completed (success or failure). `judge_rows_evaluated` integer (int64) optional Example: `95` Candidate-success rows the judge has finished (scored or skipped). Caps at the number of candidate successes, which may be below total_rows. `total_rows` integer (int64) optional Example: `100` Total dataset rows for the run, sourced from the evaluation dataset. `status` string (enum) optional Example: `MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED` Model Evaluation Run Statuses **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "run": { "candidate_model_name": "example name", "candidate_model_source": "CANDIDATE_MODEL_SOURCE_SERVERLESS", "candidate_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "created_at": "2023-01-01T00:00:00Z", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "eval_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "progress": { "candidate_rows_evaluated": 100, "judge_rows_evaluated": 95, "total_rows": 100 }, "status": "MODEL_EVALUATION_RUN_STATUS_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Download URL for Model Evaluation Run Results `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/results/download_url` To get a presigned download URL for model evaluation run results (gzip-compressed JSON), send a GET request to `/v2/genai/model_evaluation_runs/{eval_run_uuid}/results/download_url`. #### Path Parameters `eval_run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the evaluation run. ##### Request: `/v2/gen-ai/model_evaluation_runs/{eval_run_uuid}/results/download_url` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/model_evaluation_runs/123e4567-e89b-12d3-a456-426614174000/results/download_url" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `download_url` string optional Example: `example string` The presigned URL to download the gzip-compressed JSON results file (.json.gz). `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the URL expires at. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "download_url": "example string", "expires_at": "2023-01-01T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Available Models `/v2/gen-ai/models` To list all models, send a GET request to `/v2/gen-ai/models`. #### Query Parameters `usecases` array of string (enum) optional Example: `["MODEL_USECASE_UNKNOWN"]` Include only models defined for the listed usecases. - MODEL_USECASE_UNKNOWN: The use case of the model is unknown - MODEL_USECASE_AGENT: The model maybe used in an agent - MODEL_USECASE_FINETUNED: The model maybe used for fine tuning - MODEL_USECASE_KNOWLEDGEBASE: The model maybe used for knowledge bases (embedding models) - MODEL_USECASE_GUARDRAIL: The model maybe used for guardrails - MODEL_USECASE_REASONING: The model usecase for reasoning - MODEL_USECASE_SERVERLESS: The model usecase for serverless inference `public_only` boolean optional Example: `true` Only include models that are publicly available. `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/models` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `models` array of object optional The models **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` Model capabilities (inference, reasoning, vectorization, etc.) `context_window` string (int64) optional Example: `12345` Context window (maximum tokens) `created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Model description `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `id` string optional Example: `llama3.3-70b-instruct` Human-readable model identifier `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `active` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `model_availability` string optional Example: `example string` Model availability (serverless, dedicated, etc.) `name` string optional Example: `Llama 3.3 Instruct (70B)` Display name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique id of the model, this model is based on `pricing` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) **Show child properties** `cache_read_input_price_per_million` number (double) optional Example: `0.15` Per-million cache read rate for standard chat models (token_type "cache read input"). Multimodal models use text_cache_read_input_price_per_million / image_cache_read_input_price_per_million instead. `cache_write_1h_input_price_per_million` number (double) optional Example: `10` Price per million tokens written to the prompt cache with a 1-hour lifetime. `cache_write_5m_input_price_per_million` number (double) optional Example: `6.25` Price per million tokens written to the prompt cache with a 5-minute lifetime. `image_cache_read_input_price_per_million` number (double) optional Example: `0.08` `image_input_price_per_million` number (double) optional Example: `0.3` `image_output_price_per_million` number (double) optional Example: `0.4` `input_cache_read` number (double) optional Example: `0.15` Cache read input price per single token. Equivalent to cache_read_input_price_per_million. `input_price_per_million` number (double) optional Example: `0.6` `output_price_per_million` number (double) optional Example: `0.9` `price_per_audio` number (double) optional Example: `0.002` `price_per_image` number (double) optional Example: `0.003` Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead. `price_per_megapixel` number (double) optional Example: `3e-05` `price_per_second` number (double) optional Example: `0.0001` `price_per_thousand_characters` number (double) optional Example: `0.015` `price_per_video` number (double) optional Example: `0.05` `reasoning_price_per_million` number (double) optional Example: `0` Price per million reasoning tokens. 0 if the model does not charge separately for reasoning tokens. `text_cache_read_input_price_per_million` number (double) optional Example: `0.05` `text_input_price_per_million` number (double) optional Example: `0.1` Per-million token rates for models that bill text vs image tokens separately (e.g. OpenAI gpt-image-2). Standard chat models leave these at 0 and use input_price_per_million / output_price_per_million instead. Values align with usage token_type / internal/usage.Type string values for each meter. `text_output_price_per_million` number (double) optional Example: `0.2` `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `https://example.com/model.zip` Download url `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "models": [ { "capabilities": [ "example string" ], "context_window": "12345", "created_at": "2021-01-01T00:00:00Z", "description": "example string", "endpoints": [], "id": "llama3.3-70b-instruct", "is_foundational": true, "kb_default_chunk_size": 123, "kb_max_chunk_size": 123, "kb_min_chunk_size": 123, "lifecycle_status": "active", "model_availability": "example string", "name": "Llama 3.3 Instruct (70B)", "parameter_count": 123, "parent_uuid": "\"12345678-1234-1234-1234-123456789012\"", "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "example string" ], "settings": [], "thinking": true, "type": "example string", "updated_at": "2021-01-01T00:00:00Z", "upload_complete": true, "url": "https://example.com/model.zip", "uuid": "\"12345678-1234-1234-1234-123456789012\"" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model API Keys `/v2/gen-ai/models/api_keys` To list all model API keys, send a GET request to `/v2/gen-ai/models/api_keys`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/models/api_keys` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/api_keys" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_infos": [ { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Model API Key Deprecated `/v2/gen-ai/models/api_keys` **Note: This endpoint is deprecated and has been retired. All requests return a `410 gone` response.** Creating model API keys through this endpoint is no longer supported. To create a model access key, visit the manage page in the control panel. Previously, you could create a model API key by sending a POST request to `/v2/gen-ai/models/api_keys`. #### Request Body: `application/json` `name` string optional Example: `Production Key` A human friendly name to identify the key ##### Request: `/v2/gen-ai/models/api_keys` ### Payload Content type `application/json` ```json { "name": "Production Key" } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Production Key" }' \ "https://api.digitalocean.com/v2/gen-ai/models/api_keys" ``` #### Responses **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **410** The endpoint has been retired. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **410** ```json { "id": "gone", "message": "resource retired: Creating model API keys through this endpoint is retired. Go to manage page in the control panel to create a model access key." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update API Key for a Model `/v2/gen-ai/models/api_keys/{api_key_uuid}` To update a model API key, send a PUT request to `/v2/gen-ai/models/api_keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID #### Request Body: `application/json` `api_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` API key ID `name` string optional Example: `"Production Key"` Name ##### Request: `/v2/gen-ai/models/api_keys/{api_key_uuid}` ### Payload Content type `application/json` ```json { "api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \ -d '{ "api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4", "name": "test-key2" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Model API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete API Key for a Model `/v2/gen-ai/models/api_keys/{api_key_uuid}` To delete an API key for a model, send a DELETE request to `/v2/gen-ai/models/api_keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key for an agent. ##### Request: `/v2/gen-ai/models/api_keys/{api_key_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Model API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Regenerate API Key for a Model `/v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate` To regenerate a model API key, send a PUT request to `/v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/models/api_keys/{api_key_uuid}/regenerate` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/api_keys/11efcf7e-824d-2808-bf8f-4e013e2ddde4/regenerate" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional Model API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "name": "example name", "secret_key": "example string", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Catalog `/v2/gen-ai/models/catalog` Returns all available models. #### Query Parameters `page` integer optional Example: `1` Page number for pagination. `limit` integer optional Example: `1` Deprecated. Use `per_page` instead. `search` string optional Example: `llama` Partial, case-insensitive match on the model's display name. `model_type` array of string optional Example: `["chat"]` Filter by model type. Multiple values use OR semantics. Accepted values: `chat`, `embedding`, `image`, `reasoning`, `coding`, `audio`, `reranking`. `provider` array of string optional Example: `["Meta"]` Filter by model creator/developer. Multiple values use OR semantics. Values are data-driven; use `available_providers` from the response to discover valid options. `availability` array of string optional Example: `["serverless"]` Filter by deployment availability. Multiple values use OR semantics. Accepted values: `serverless`, `dedicated`. `badges` array of string optional Example: `["featured"]` Filter by badge. Multiple values use OR semantics. Accepted values: `featured`, `new`, `preview`. `sort_by` string, one of: MODEL_CATALOG_SORT_BY_CREATED_AT, MODEL_CATALOG_SORT_BY_NAME, MODEL_CATALOG_SORT_BY_PRICE optional Example: `MODEL_CATALOG_SORT_BY_NAME` Field to sort results by. Default is `MODEL_CATALOG_SORT_BY_CREATED_AT`. - MODEL_CATALOG_SORT_BY_CREATED_AT: Default: sort by creation date. - MODEL_CATALOG_SORT_BY_NAME: Sort by the model's display name (case-insensitive). - MODEL_CATALOG_SORT_BY_PRICE: Sort by input token price. Default: `MODEL_CATALOG_SORT_BY_CREATED_AT` `per_page` integer optional Example: `1` Number of items per page. Replaces the deprecated `limit` field. `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_ASC` Sort direction. Defaults to descending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` `use_case` string (enum) optional Example: `MODEL_CATALOG_USE_CASE_CODING` Filter by pre-defined use case. When unspecified, no use-case filter is applied. Accepted values: `MODEL_CATALOG_USE_CASE_CODING`, `MODEL_CATALOG_USE_CASE_AGENTS`, `MODEL_CATALOG_USE_CASE_AUDIO`, `MODEL_CATALOG_USE_CASE_IMAGE`, `MODEL_CATALOG_USE_CASE_EMBEDDING`, `MODEL_CATALOG_USE_CASE_VIDEO`. - MODEL_CATALOG_USE_CASE_UNSPECIFIED: No use-case filter applied; return all models. - MODEL_CATALOG_USE_CASE_CODING: Coding-optimized models: model_type = coding, or usecases include coding, agentic_coding, or code_generation. - MODEL_CATALOG_USE_CASE_AGENTS: Agent-building models: usecases include tool_calling, agentic, agent_platform, agentic_workflows, or agentic_coding. - MODEL_CATALOG_USE_CASE_AUDIO: Audio models: model_type is audio, or usecases include audio, text_to_speech, or voice_cloning, or output modalities include audio. - MODEL_CATALOG_USE_CASE_IMAGE: Image models: model_type is image, or usecases include image_generation, text_to_image, or ideogram, or output modalities include image. - MODEL_CATALOG_USE_CASE_VIDEO: Video models: usecases include video_generation or text_to_video, or output modalities include video. - MODEL_CATALOG_USE_CASE_EMBEDDING: Embedding and reranking models: model_type is embedding or reranking, or usecases include vectorization or reranking. Default: `MODEL_CATALOG_USE_CASE_UNSPECIFIED` ##### Request: `/v2/gen-ai/models/catalog` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/catalog?page=1&per_page=20&search=llama&model_type=chat&sort_by=MODEL_CATALOG_SORT_BY_NAME&sort_direction=SORT_DIRECTION_ASC" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_availability` array of string optional Example: `["example string"]` All deployment availability values the client can offer in the availability filter UI. `available_badges` array of string optional Example: `["example string"]` All badge values the client can offer in the badges filter UI. `available_model_types` array of string optional Example: `["example string"]` All model type values the client can offer in the type filter UI. `available_providers` array of string optional Example: `["example string"]` All provider values the client can offer in the provider filter UI. `available_sort_by` array of string, one of: MODEL_CATALOG_SORT_BY_CREATED_AT, MODEL_CATALOG_SORT_BY_NAME, MODEL_CATALOG_SORT_BY_PRICE optional All sort-by field values the client can offer in the sort UI. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional All sort-direction values the client can offer in the sort UI. `data` array of object optional **Show child properties** `availability` array of string optional Example: `["example string"]` `badges` array of string optional Example: `["example string"]` Badges for models `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` `context_window` string (int64) optional Example: `128000` Specs (flat) `created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` RFC 3339 timestamp indicating when the model was added to the catalog. `creator` string optional Example: `"Meta"` Model creator/developer (e.g., "Meta", "Anthropic", "OpenAI") `hugging_face_id` string optional Example: `"meta-llama/Llama-3.3-70B-Instruct"` The Hugging Face repository ID (e.g. "meta-llama/Llama-3.3-70B-Instruct") the model is based on, when applicable. Omitted for models not sourced from Hugging Face. `id` string optional Example: `"506a3371-88d0-4047-9212-e2079497ac68"` Identity `max_output_tokens` string (int64) optional Example: `65536` The maximum number of output tokens the model can generate in a single response. `model_id` string optional Example: `"llama3.1-70b-instruct"` Model identifier used for API calls (e.g., "llama3.1-70b-instruct") `name` string optional Example: `"Llama 3.1 70B"` `parameter_count` number (float) optional Example: `70` `pricing` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) **Show child properties** `cache_read_input_price_per_million` number (double) optional Example: `0.15` Per-million cache read rate for standard chat models (token_type "cache read input"). Multimodal models use text_cache_read_input_price_per_million / image_cache_read_input_price_per_million instead. `cache_write_1h_input_price_per_million` number (double) optional Example: `10` Price per million tokens written to the prompt cache with a 1-hour lifetime. `cache_write_5m_input_price_per_million` number (double) optional Example: `6.25` Price per million tokens written to the prompt cache with a 5-minute lifetime. `image_cache_read_input_price_per_million` number (double) optional Example: `0.08` `image_input_price_per_million` number (double) optional Example: `0.3` `image_output_price_per_million` number (double) optional Example: `0.4` `input_cache_read` number (double) optional Example: `0.15` Cache read input price per single token. Equivalent to cache_read_input_price_per_million. `input_price_per_million` number (double) optional Example: `0.6` `output_price_per_million` number (double) optional Example: `0.9` `price_per_audio` number (double) optional Example: `0.002` `price_per_image` number (double) optional Example: `0.003` Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead. `price_per_megapixel` number (double) optional Example: `3e-05` `price_per_second` number (double) optional Example: `0.0001` `price_per_thousand_characters` number (double) optional Example: `0.015` `price_per_video` number (double) optional Example: `0.05` `reasoning_price_per_million` number (double) optional Example: `0` Price per million reasoning tokens. 0 if the model does not charge separately for reasoning tokens. `text_cache_read_input_price_per_million` number (double) optional Example: `0.05` `text_input_price_per_million` number (double) optional Example: `0.1` Per-million token rates for models that bill text vs image tokens separately (e.g. OpenAI gpt-image-2). Standard chat models leave these at 0 and use input_price_per_million / output_price_per_million instead. Values align with usage token_type / internal/usage.Type string values for each meter. `text_output_price_per_million` number (double) optional Example: `0.2` `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `scaled_pricing_enabled` boolean optional Example: `true` True when this model's pricing varies over time. Retrieve the model's details for the full pricing schedule. False for models with fixed pricing. `short_description` string optional Example: `"Fast, efficient model for general tasks"` `type` string optional Example: `"text-to-text"` `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_availability": [ "example string" ], "available_badges": [ "example string" ], "available_model_types": [ "example string" ], "available_providers": [ "example string" ], "available_sort_by": [ "MODEL_CATALOG_SORT_BY_CREATED_AT" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "data": [ { "availability": [ "example string" ], "badges": [ "example string" ], "capabilities": [ "example string" ], "context_window": "128000", "created_at": "2021-01-01T00:00:00Z", "creator": "\"Meta\"", "hugging_face_id": "\"meta-llama/Llama-3.3-70B-Instruct\"", "id": "\"506a3371-88d0-4047-9212-e2079497ac68\"", "max_output_tokens": "65536", "model_id": "\"llama3.1-70b-instruct\"", "name": "\"Llama 3.1 70B\"", "parameter_count": 70, "provider": "MODEL_PROVIDER_DIGITALOCEAN", "scaled_pricing_enabled": true, "short_description": "\"Fast, efficient model for general tasks\"", "type": "\"text-to-text\"" } ], "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Model Catalog Card `/v2/gen-ai/models/catalog/{id}` Returns detailed information for a specific model in the catalog including capabilities, pricing, and code examples. #### Path Parameters `id` string required Example: `"example string"` #### Query Parameters `model_id` string optional Example: `"example string"` Model identifier used for API calls (e.g., "llama3.1-70b-instruct"). Alternative to UUID lookup. ##### Request: `/v2/gen-ai/models/catalog/{id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/gen-ai/models/catalog/18bc9b8f-73c5-11f0-b074-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `data` object optional Detail view for GetModelCatalogCard **Show child properties** `availability` array of string optional Example: `["example string"]` `badges` array of string optional Example: `["example string"]` Badges for models `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` `code_snippets` object optional Code examples for using the model **Show child properties** `curl` string optional Example: `example string` `javascript` string optional Example: `example string` `python` string optional Example: `example string` `sdk` string optional Example: `example string` `context_window` string (int64) optional Example: `128000` Specs (same as Entry) `creator` string optional Example: `"Meta"` Model creator/developer (e.g., "Meta", "Anthropic", "OpenAI") `description` string optional Example: `"Claude Sonnet 4 is Anthropic's most capable model..."` Card-specific `hugging_face_id` string optional Example: `"meta-llama/Llama-3.3-70B-Instruct"` The Hugging Face repository ID (e.g. "meta-llama/Llama-3.3-70B-Instruct") the model is based on, when applicable. Omitted for models not sourced from Hugging Face. `id` string optional Example: `"506a3371-88d0-4047-9212-e2079497ac68"` Identity (same as Entry) `max_output_tokens` string (int64) optional Example: `65536` The maximum number of output tokens the model can generate in a single response. `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `model_id` string optional Example: `"llama3.1-70b-instruct"` Model identifier used for API calls (e.g., "llama3.1-70b-instruct") `name` string optional Example: `"Llama 3.1 70B"` `parameter_count` number (float) optional Example: `70` `pricing` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) **Show child properties** `cache_read_input_price_per_million` number (double) optional Example: `0.15` Per-million cache read rate for standard chat models (token_type "cache read input"). Multimodal models use text_cache_read_input_price_per_million / image_cache_read_input_price_per_million instead. `cache_write_1h_input_price_per_million` number (double) optional Example: `10` Price per million tokens written to the prompt cache with a 1-hour lifetime. `cache_write_5m_input_price_per_million` number (double) optional Example: `6.25` Price per million tokens written to the prompt cache with a 5-minute lifetime. `image_cache_read_input_price_per_million` number (double) optional Example: `0.08` `image_input_price_per_million` number (double) optional Example: `0.3` `image_output_price_per_million` number (double) optional Example: `0.4` `input_cache_read` number (double) optional Example: `0.15` Cache read input price per single token. Equivalent to cache_read_input_price_per_million. `input_price_per_million` number (double) optional Example: `0.6` `output_price_per_million` number (double) optional Example: `0.9` `price_per_audio` number (double) optional Example: `0.002` `price_per_image` number (double) optional Example: `0.003` Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead. `price_per_megapixel` number (double) optional Example: `3e-05` `price_per_second` number (double) optional Example: `0.0001` `price_per_thousand_characters` number (double) optional Example: `0.015` `price_per_video` number (double) optional Example: `0.05` `reasoning_price_per_million` number (double) optional Example: `0` Price per million reasoning tokens. 0 if the model does not charge separately for reasoning tokens. `text_cache_read_input_price_per_million` number (double) optional Example: `0.05` `text_input_price_per_million` number (double) optional Example: `0.1` Per-million token rates for models that bill text vs image tokens separately (e.g. OpenAI gpt-image-2). Standard chat models leave these at 0 and use input_price_per_million / output_price_per_million instead. Values align with usage token_type / internal/usage.Type string values for each meter. `text_output_price_per_million` number (double) optional Example: `0.2` `pricing_detail` object optional The complete set of prices for a model, covering every available variant. **Show child properties** `variants` array of object optional Each available pricing variant for the model. **Show child properties** `currency` string optional Example: `USD` Currency code for this variant's rates (e.g. `USD`). `label` string optional Example: `Standard` Display name for the variant (e.g. `Standard`, `Fast Mode`, `1M Context`). `mode` string, one of: MODEL_BILLING_MODE_UNSPECIFIED, MODEL_BILLING_MODE_INTERACTIVE, MODEL_BILLING_MODE_BATCH optional Example: `MODEL_BILLING_MODE_UNSPECIFIED` Whether rates apply to real-time or batch requests. - MODEL_BILLING_MODE_INTERACTIVE: Real-time request pricing. - MODEL_BILLING_MODE_BATCH: Discounted pricing for asynchronous batch requests. `prices` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `scaled_pricing` object optional Pricing that varies over time. When present, the rates move between the low and high bounds below across the intervals in the schedule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier` string (enum) optional Example: `MODEL_PRICING_TIER_UNSPECIFIED` A pricing variant of a model, such as a faster serving option or a larger context window. - MODEL_PRICING_TIER_STANDARD: Default pricing. - MODEL_PRICING_TIER_FAST_MODE: Faster, higher-priority serving at a premium price. - MODEL_PRICING_TIER_EXTENDED_1M: Pricing for the 1M-token context window. - MODEL_PRICING_TIER_EXTENDED_272K: Pricing for the 272K-token context window. - MODEL_PRICING_TIER_BYOK: Pricing when using your own model API key. `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `short_description` string optional Example: `"Fast, efficient model for general tasks"` `type` string optional Example: `"text-to-text"` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "data": { "availability": [ "example string" ], "badges": [ "example string" ], "capabilities": [ "example string" ], "code_snippets": { "curl": "example string", "javascript": "example string", "python": "example string", "sdk": "example string" }, "context_window": "128000", "creator": "\"Meta\"", "description": "\"Claude Sonnet 4 is Anthropic's most capable model...\"", "hugging_face_id": "\"meta-llama/Llama-3.3-70B-Instruct\"", "id": "\"506a3371-88d0-4047-9212-e2079497ac68\"", "max_output_tokens": "65536", "modalities": { "input": [ "example string" ], "output": [ "example string" ] }, "model_id": "\"llama3.1-70b-instruct\"", "name": "\"Llama 3.1 70B\"", "parameter_count": 70, "pricing": { "cache_read_input_price_per_million": 0.15, "cache_write_1h_input_price_per_million": 10, "cache_write_5m_input_price_per_million": 6.25, "image_cache_read_input_price_per_million": 0.08, "image_input_price_per_million": 0.3, "image_output_price_per_million": 0.4, "input_cache_read": 0.15, "input_price_per_million": 0.6, "output_price_per_million": 0.9, "price_per_audio": 0.002, "price_per_image": 0.003, "price_per_megapixel": 0.00003, "price_per_second": 0.0001, "price_per_thousand_characters": 0.015, "price_per_video": 0.05, "reasoning_price_per_million": 0, "text_cache_read_input_price_per_million": 0.05, "text_input_price_per_million": 0.1, "text_output_price_per_million": 0.2 }, "pricing_detail": { "variants": [] }, "provider": "MODEL_PROVIDER_DIGITALOCEAN", "short_description": "\"Fast, efficient model for general tasks\"", "type": "\"text-to-text\"" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Catalog V2 `/v2/gen-ai/models/catalog_v2` Returns the model catalog using the V2 card shape (typed serving, badges, and modalities). Requires authentication. #### Query Parameters `page` integer optional Example: `1` Page number for pagination. `per_page` integer optional Example: `1` Number of items per page. `search` string optional Example: `llama` Optional partial, case-insensitive match on the display name or model ID. Omit this when filtering only by modality, serving, or product. `serving` array of string, one of: MODEL_SERVING_UNSPECIFIED, MODEL_SERVING_SERVERLESS, MODEL_SERVING_DEDICATED optional Example: `["MODEL_SERVING_SERVERLESS"]` Filter by where the model is served. Multiple values use OR semantics. - MODEL_SERVING_SERVERLESS: Serverless inference. - MODEL_SERVING_DEDICATED: Dedicated inference. `badges` array of string (enum) optional Example: `["MODEL_CATALOG_BADGE_FEATURED"]` Filter by badge. Multiple values use OR semantics. - MODEL_CATALOG_BADGE_FEATURED: Featured in the catalog. - MODEL_CATALOG_BADGE_NEW: Newly added. - MODEL_CATALOG_BADGE_PREVIEW: Preview. - MODEL_CATALOG_BADGE_DEPRECATING: Scheduled for deprecation. - MODEL_CATALOG_BADGE_INFERENCE_ROUTER: Inference Router preset. `input_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` Require every listed modality as a model input. Multiple values use AND semantics. - MODEL_MODALITY_TEXT: plain text - MODEL_MODALITY_IMAGE: still images - MODEL_MODALITY_AUDIO: audio - MODEL_MODALITY_VIDEO: video - MODEL_MODALITY_EMBEDDING: embedding vectors - MODEL_MODALITY_RANKING: document ranking scores produced by reranking models - MODEL_MODALITY_DECISIONS: structured decisions produced by classification models `output_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` Require every listed modality as a model output. Multiple values use AND semantics. - MODEL_MODALITY_TEXT: plain text - MODEL_MODALITY_IMAGE: still images - MODEL_MODALITY_AUDIO: audio - MODEL_MODALITY_VIDEO: video - MODEL_MODALITY_EMBEDDING: embedding vectors - MODEL_MODALITY_RANKING: document ranking scores produced by reranking models - MODEL_MODALITY_DECISIONS: structured decisions produced by classification models `product` array of string, one of: MODEL_CATALOG_PRODUCT_UNSPECIFIED, MODEL_CATALOG_PRODUCT_EVALUATIONS_JUDGE, MODEL_CATALOG_PRODUCT_HARNESS_RUNTIME, MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE optional Example: `["MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE"]` Filter by product enrollment. - MODEL_CATALOG_PRODUCT_EVALUATIONS_JUDGE: Model can judge evaluations. - MODEL_CATALOG_PRODUCT_HARNESS_RUNTIME: Model is enrolled for the harness runtime. - MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE: Model can be an evaluation or simulation candidate. It serves a text endpoint and accepts and returns text. `capabilities` array of string optional Example: `["tool_calling"]` Require every listed capability. Multiple values use AND semantics. `coding` matches a coding specialisation, not only models whose type is coding. `item_type` array of string, one of: MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED, MODEL_CATALOG_ITEM_TYPE_MODEL, MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER optional Example: `["MODEL_CATALOG_ITEM_TYPE_MODEL"]` Include foundation models, Inference Router presets, or both. Omit to return both. - MODEL_CATALOG_ITEM_TYPE_MODEL: A foundation or inference model. - MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER: An Inference Router preset. `sort_by` string (enum) optional Example: `MODEL_CATALOG_SORT_BY_NAME` Field to sort results by. Default is `MODEL_CATALOG_SORT_BY_CREATED_AT`. - MODEL_CATALOG_SORT_BY_CREATED_AT: Sort by creation date. - MODEL_CATALOG_SORT_BY_NAME: Sort by display name, case-insensitive. - MODEL_CATALOG_SORT_BY_PRICE: Sort by input token price. - MODEL_CATALOG_SORT_BY_E2E_LATENCY_P50: Sort by canary end-to-end latency p50, in seconds. Lower is better. Rows without performance data sort after rows with data. - MODEL_CATALOG_SORT_BY_THROUGHPUT_P50: Sort by canary throughput p50, in tokens per second. Higher is better. Rows without performance data sort after rows with data. - MODEL_CATALOG_SORT_BY_TTFT_P50: Sort by canary time to first token p50, in seconds. Lower is better. Rows without performance data sort after rows with data. Default: `MODEL_CATALOG_SORT_BY_CREATED_AT` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_ASC` Sort direction. Defaults to descending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` `creator` array of string optional Example: `["Meta"]` Filter by model creator or developer, such as Meta or Google. Multiple values use OR semantics and match case-insensitively. Use `available_creators` in the response to discover valid options. ##### Request: `/v2/gen-ai/models/catalog_v2` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/catalog_v2?page=1&per_page=20&search=llama&serving=MODEL_SERVING_SERVERLESS&sort_by=MODEL_CATALOG_SORT_BY_NAME&sort_direction=SORT_DIRECTION_ASC" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_badges` array of string (enum) optional Badge values present in the unfiltered catalog. `available_creators` array of string optional Example: `["Meta"]` Creator values the client can offer in the creator filter. `available_input_modalities` array of string (enum) optional Modality values accepted by the input_modality filter. `available_model_types` array of string optional Example: `["chat"]` Model types present in the unfiltered catalog, such as chat or embedding. Informational only. V2 has no model_type request filter; browse by input_modality, output_modality, or capabilities. `available_output_modalities` array of string (enum) optional Modality values accepted by the output_modality filter. `available_products` array of string, one of: MODEL_CATALOG_PRODUCT_UNSPECIFIED, MODEL_CATALOG_PRODUCT_EVALUATIONS_JUDGE, MODEL_CATALOG_PRODUCT_HARNESS_RUNTIME, MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE optional Product enrollment values present in the unfiltered catalog. `available_serving` array of string, one of: MODEL_SERVING_UNSPECIFIED, MODEL_SERVING_SERVERLESS, MODEL_SERVING_DEDICATED optional Serving values present in the unfiltered catalog. `available_sort_by` array of string (enum) optional Sort fields the client can offer in the sort UI. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort directions the client can offer in the sort UI. `data` array of object optional **Show child properties** `badges` array of string (enum) optional Example: `["MODEL_CATALOG_BADGE_FEATURED"]` `capabilities` array of string optional Example: `["tool_calling"]` `code_snippets` object optional Code examples for using the model **Show child properties** `curl` string optional Example: `example string` `javascript` string optional Example: `example string` `python` string optional Example: `example string` `sdk` string optional Example: `example string` `context_window` string (int64) optional Example: `128000` `created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` RFC 3339 timestamp indicating when the model was added to the catalog. `creator` string optional Example: `"Meta"` Model creator or developer, such as Meta, Anthropic, or OpenAI. `description` string optional Example: `"Claude Sonnet 4 is Anthropic's most capable model..."` Full catalog description. Populated on Get Model Catalog Card V2. `huggingface_repo_id` string optional Example: `"meta-llama/Llama-3.3-70B-Instruct"` Hugging Face repository ID the model is based on, when applicable. `id` string optional Example: `"506a3371-88d0-4047-9212-e2079497ac68"` `input_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` `item_type` string, one of: MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED, MODEL_CATALOG_ITEM_TYPE_MODEL, MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER optional Example: `MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED` Whether a catalog row is a foundation model or an Inference Router preset. - MODEL_CATALOG_ITEM_TYPE_MODEL: A foundation or inference model. - MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER: An Inference Router preset. `liveliness` object optional Performance statistics for a model, computed from canary traffic. Present when the feature is enabled. Each metric (ttft, e2e_latency, throughput) has its own status. **Show child properties** `e2e_latency` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `overall_status` string optional Example: `"ok"` Summary across metrics: "ok" when every metric has data, "partial_data" when some do and some do not, "insufficient_data" when none do. `source` string optional Example: `"canary"` Traffic the statistics are computed from. Always "canary". `throughput` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `ttft` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `max_output_tokens` string (int64) optional Example: `65536` Maximum number of output tokens the model can generate in one response. `max_tokens` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `model_id` string optional Example: `"llama3.1-70b-instruct"` Model identifier used for inference API calls, such as llama3.1-70b-instruct. `name` string optional Example: `"Llama 3.1 70B"` `output_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` `parameter_count_in_billions` number (float) optional Example: `70` Parameter count in billions. For example, 70.0 means 70B. `performance` object optional Compact canary performance rollup for catalog browse and the catalog card. List Model Catalog V2 uses a rolling last-24-hour window (window_days is 1). Get Model Catalog Card V2 uses the sample-weighted mean of daily percentiles over the liveliness window, typically 7 days. The full daily series stays on liveliness. This is canary traffic, not live customer load. **Show child properties** `e2e_latency_p50_seconds` number (double) optional Example: `0.42` End-to-end latency in seconds, p50. `e2e_latency_p75_seconds` number (double) optional Example: `0.9` End-to-end latency in seconds, p75. `e2e_latency_p95_seconds` number (double) optional Example: `1.9` End-to-end latency in seconds, p95. `samples` integer (int64) optional Example: `168` Request samples across the window. Prefers end-to-end latency, then time to first token, then throughput. `status` string optional Example: `"ok"` "ok" when time to first token, end-to-end latency, and throughput all have data, "partial_data" when only some do, "insufficient_data" when none do. `throughput_p50_tok_per_s` number (double) optional Example: `48.5` Throughput in tokens per second, p50. `throughput_p75_tok_per_s` number (double) optional Example: `60` Throughput in tokens per second, p75. `throughput_p95_tok_per_s` number (double) optional Example: `72` Throughput in tokens per second, p95. `ttft_p50_seconds` number (double) optional Example: `0.18` Time to first token in seconds, p50. Streaming canary probes only. `ttft_p75_seconds` number (double) optional Example: `0.3` Time to first token in seconds, p75. Streaming canary probes only. `ttft_p95_seconds` number (double) optional Example: `0.55` Time to first token in seconds, p95. Streaming canary probes only. `window_days` integer (int64) optional Example: `7` Lookback window length in days. 1 is the rolling 24-hour list window. `pricing` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) **Show child properties** `cache_read_input_price_per_million` number (double) optional Example: `0.15` Per-million cache read rate for standard chat models (token_type "cache read input"). Multimodal models use text_cache_read_input_price_per_million / image_cache_read_input_price_per_million instead. `cache_write_1h_input_price_per_million` number (double) optional Example: `10` Price per million tokens written to the prompt cache with a 1-hour lifetime. `cache_write_5m_input_price_per_million` number (double) optional Example: `6.25` Price per million tokens written to the prompt cache with a 5-minute lifetime. `image_cache_read_input_price_per_million` number (double) optional Example: `0.08` `image_input_price_per_million` number (double) optional Example: `0.3` `image_output_price_per_million` number (double) optional Example: `0.4` `input_cache_read` number (double) optional Example: `0.15` Cache read input price per single token. Equivalent to cache_read_input_price_per_million. `input_price_per_million` number (double) optional Example: `0.6` `output_price_per_million` number (double) optional Example: `0.9` `price_per_audio` number (double) optional Example: `0.002` `price_per_image` number (double) optional Example: `0.003` Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead. `price_per_megapixel` number (double) optional Example: `3e-05` `price_per_second` number (double) optional Example: `0.0001` `price_per_thousand_characters` number (double) optional Example: `0.015` `price_per_video` number (double) optional Example: `0.05` `reasoning_price_per_million` number (double) optional Example: `0` Price per million reasoning tokens. 0 if the model does not charge separately for reasoning tokens. `text_cache_read_input_price_per_million` number (double) optional Example: `0.05` `text_input_price_per_million` number (double) optional Example: `0.1` Per-million token rates for models that bill text vs image tokens separately (e.g. OpenAI gpt-image-2). Standard chat models leave these at 0 and use input_price_per_million / output_price_per_million instead. Values align with usage token_type / internal/usage.Type string values for each meter. `text_output_price_per_million` number (double) optional Example: `0.2` `pricing_detail` object optional The complete set of prices for a model, covering every available variant. **Show child properties** `variants` array of object optional Each available pricing variant for the model. **Show child properties** `currency` string optional Example: `USD` Currency code for this variant's rates (e.g. `USD`). `label` string optional Example: `Standard` Display name for the variant (e.g. `Standard`, `Fast Mode`, `1M Context`). `mode` string, one of: MODEL_BILLING_MODE_UNSPECIFIED, MODEL_BILLING_MODE_INTERACTIVE, MODEL_BILLING_MODE_BATCH optional Example: `MODEL_BILLING_MODE_UNSPECIFIED` Whether rates apply to real-time or batch requests. - MODEL_BILLING_MODE_INTERACTIVE: Real-time request pricing. - MODEL_BILLING_MODE_BATCH: Discounted pricing for asynchronous batch requests. `prices` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `scaled_pricing` object optional Pricing that varies over time. When present, the rates move between the low and high bounds below across the intervals in the schedule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier` string (enum) optional Example: `MODEL_PRICING_TIER_UNSPECIFIED` A pricing variant of a model, such as a faster serving option or a larger context window. - MODEL_PRICING_TIER_STANDARD: Default pricing. - MODEL_PRICING_TIER_FAST_MODE: Faster, higher-priority serving at a premium price. - MODEL_PRICING_TIER_EXTENDED_1M: Pricing for the 1M-token context window. - MODEL_PRICING_TIER_EXTENDED_272K: Pricing for the 272K-token context window. - MODEL_PRICING_TIER_BYOK: Pricing when using your own model API key. `products` array of string, one of: MODEL_CATALOG_PRODUCT_UNSPECIFIED, MODEL_CATALOG_PRODUCT_EVALUATIONS_JUDGE, MODEL_CATALOG_PRODUCT_HARNESS_RUNTIME, MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE optional Example: `["MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE"]` `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["low"]` Supported reasoning effort levels, such as low, medium, and high. `scaled_pricing_enabled` boolean optional Example: `true` True when this model's pricing varies over time. `serving` array of string, one of: MODEL_SERVING_UNSPECIFIED, MODEL_SERVING_SERVERLESS, MODEL_SERVING_DEDICATED optional Example: `["MODEL_SERVING_SERVERLESS"]` `short_description` string optional Example: `"Fast, efficient model for general tasks"` `supported_endpoints` array of string (enum) optional Example: `["MODEL_SUPPORTED_ENDPOINT_CHAT_COMPLETIONS"]` Inference endpoints this model serves, such as chat completions or responses. Empty for Inference Router presets. `supports_temperature` boolean optional Example: `true` Whether the inference request schema includes a temperature field. `temperature` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `thinking` boolean optional Example: `true` Whether the model supports extended thinking. `top_p` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `type` string optional Example: `"chat"` Catalog model type, such as chat or embedding. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_badges": [ "MODEL_CATALOG_BADGE_UNSPECIFIED" ], "available_creators": [ "Meta" ], "available_input_modalities": [ "MODEL_MODALITY_UNSPECIFIED" ], "available_model_types": [ "chat" ], "available_output_modalities": [ "MODEL_MODALITY_UNSPECIFIED" ], "available_products": [ "MODEL_CATALOG_PRODUCT_UNSPECIFIED" ], "available_serving": [ "MODEL_SERVING_UNSPECIFIED" ], "available_sort_by": [ "MODEL_CATALOG_SORT_BY_CREATED_AT" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "data": [ { "badges": [ "MODEL_CATALOG_BADGE_FEATURED" ], "capabilities": [ "tool_calling" ], "context_window": "128000", "created_at": "2021-01-01T00:00:00Z", "creator": "\"Meta\"", "description": "\"Claude Sonnet 4 is Anthropic's most capable model...\"", "huggingface_repo_id": "\"meta-llama/Llama-3.3-70B-Instruct\"", "id": "\"506a3371-88d0-4047-9212-e2079497ac68\"", "input_modality": [ "MODEL_MODALITY_TEXT" ], "item_type": "MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED", "max_output_tokens": "65536", "model_id": "\"llama3.1-70b-instruct\"", "name": "\"Llama 3.1 70B\"", "output_modality": [ "MODEL_MODALITY_TEXT" ], "parameter_count_in_billions": 70, "products": [ "MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE" ], "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "low" ], "scaled_pricing_enabled": true, "serving": [ "MODEL_SERVING_SERVERLESS" ], "short_description": "\"Fast, efficient model for general tasks\"", "supported_endpoints": [ "MODEL_SUPPORTED_ENDPOINT_CHAT_COMPLETIONS" ], "supports_temperature": true, "thinking": true, "type": "\"chat\"" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Model Catalog Card V2 `/v2/gen-ai/models/catalog_v2/{id}` Returns a V2 catalog card by catalog ID or model ID. Requires authentication. Visibility matches List Model Catalog V2. #### Path Parameters `id` string required Example: `18bc9b8f-73c5-11f0-b074-4e013e2ddde4` Catalog ID of the model. Use `model_id` instead to look up by the inference model ID. #### Query Parameters `model_id` string optional Example: `llama3.1-70b-instruct` Inference model ID, such as `llama3.1-70b-instruct`. Alternative to the catalog ID in the path. ##### Request: `/v2/gen-ai/models/catalog_v2/{id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/catalog_v2/18bc9b8f-73c5-11f0-b074-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `data` object optional Catalog row returned by List Model Catalog V2 and Get Model Catalog Card V2. description, code_snippets, pricing_detail, and liveliness are populated on the card and empty on list rows. performance is populated on list rows and the card when canary data is available. **Show child properties** `badges` array of string (enum) optional Example: `["MODEL_CATALOG_BADGE_FEATURED"]` `capabilities` array of string optional Example: `["tool_calling"]` `code_snippets` object optional Code examples for using the model **Show child properties** `curl` string optional Example: `example string` `javascript` string optional Example: `example string` `python` string optional Example: `example string` `sdk` string optional Example: `example string` `context_window` string (int64) optional Example: `128000` `created_at` string (date-time) optional Example: `2021-01-01T00:00:00Z` RFC 3339 timestamp indicating when the model was added to the catalog. `creator` string optional Example: `"Meta"` Model creator or developer, such as Meta, Anthropic, or OpenAI. `description` string optional Example: `"Claude Sonnet 4 is Anthropic's most capable model..."` Full catalog description. Populated on Get Model Catalog Card V2. `huggingface_repo_id` string optional Example: `"meta-llama/Llama-3.3-70B-Instruct"` Hugging Face repository ID the model is based on, when applicable. `id` string optional Example: `"506a3371-88d0-4047-9212-e2079497ac68"` `input_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` `item_type` string, one of: MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED, MODEL_CATALOG_ITEM_TYPE_MODEL, MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER optional Example: `MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED` Whether a catalog row is a foundation model or an Inference Router preset. - MODEL_CATALOG_ITEM_TYPE_MODEL: A foundation or inference model. - MODEL_CATALOG_ITEM_TYPE_INFERENCE_ROUTER: An Inference Router preset. `liveliness` object optional Performance statistics for a model, computed from canary traffic. Present when the feature is enabled. Each metric (ttft, e2e_latency, throughput) has its own status. **Show child properties** `e2e_latency` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `overall_status` string optional Example: `"ok"` Summary across metrics: "ok" when every metric has data, "partial_data" when some do and some do not, "insufficient_data" when none do. `source` string optional Example: `"canary"` Traffic the statistics are computed from. Always "canary". `throughput` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `ttft` object optional One performance metric for a model: its daily series, oldest day first, and whether it has data. **Show child properties** `days` array of object optional Daily points, oldest first. Empty when status is "insufficient_data". *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `status` string optional Example: `"ok"` "ok" when days has data; "insufficient_data" when there are not enough recent samples for this model. `unit` string optional Example: `"s"` Unit of the percentile values: "s" for ttft and e2e_latency, "tok/s" for throughput. `max_output_tokens` string (int64) optional Example: `65536` Maximum number of output tokens the model can generate in one response. `max_tokens` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `model_id` string optional Example: `"llama3.1-70b-instruct"` Model identifier used for inference API calls, such as llama3.1-70b-instruct. `name` string optional Example: `"Llama 3.1 70B"` `output_modality` array of string (enum) optional Example: `["MODEL_MODALITY_TEXT"]` `parameter_count_in_billions` number (float) optional Example: `70` Parameter count in billions. For example, 70.0 means 70B. `performance` object optional Compact canary performance rollup for catalog browse and the catalog card. List Model Catalog V2 uses a rolling last-24-hour window (window_days is 1). Get Model Catalog Card V2 uses the sample-weighted mean of daily percentiles over the liveliness window, typically 7 days. The full daily series stays on liveliness. This is canary traffic, not live customer load. **Show child properties** `e2e_latency_p50_seconds` number (double) optional Example: `0.42` End-to-end latency in seconds, p50. `e2e_latency_p75_seconds` number (double) optional Example: `0.9` End-to-end latency in seconds, p75. `e2e_latency_p95_seconds` number (double) optional Example: `1.9` End-to-end latency in seconds, p95. `samples` integer (int64) optional Example: `168` Request samples across the window. Prefers end-to-end latency, then time to first token, then throughput. `status` string optional Example: `"ok"` "ok" when time to first token, end-to-end latency, and throughput all have data, "partial_data" when only some do, "insufficient_data" when none do. `throughput_p50_tok_per_s` number (double) optional Example: `48.5` Throughput in tokens per second, p50. `throughput_p75_tok_per_s` number (double) optional Example: `60` Throughput in tokens per second, p75. `throughput_p95_tok_per_s` number (double) optional Example: `72` Throughput in tokens per second, p95. `ttft_p50_seconds` number (double) optional Example: `0.18` Time to first token in seconds, p50. Streaming canary probes only. `ttft_p75_seconds` number (double) optional Example: `0.3` Time to first token in seconds, p75. Streaming canary probes only. `ttft_p95_seconds` number (double) optional Example: `0.55` Time to first token in seconds, p95. Streaming canary probes only. `window_days` integer (int64) optional Example: `7` Lookback window length in days. 1 is the rolling 24-hour list window. `pricing` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) **Show child properties** `cache_read_input_price_per_million` number (double) optional Example: `0.15` Per-million cache read rate for standard chat models (token_type "cache read input"). Multimodal models use text_cache_read_input_price_per_million / image_cache_read_input_price_per_million instead. `cache_write_1h_input_price_per_million` number (double) optional Example: `10` Price per million tokens written to the prompt cache with a 1-hour lifetime. `cache_write_5m_input_price_per_million` number (double) optional Example: `6.25` Price per million tokens written to the prompt cache with a 5-minute lifetime. `image_cache_read_input_price_per_million` number (double) optional Example: `0.08` `image_input_price_per_million` number (double) optional Example: `0.3` `image_output_price_per_million` number (double) optional Example: `0.4` `input_cache_read` number (double) optional Example: `0.15` Cache read input price per single token. Equivalent to cache_read_input_price_per_million. `input_price_per_million` number (double) optional Example: `0.6` `output_price_per_million` number (double) optional Example: `0.9` `price_per_audio` number (double) optional Example: `0.002` `price_per_image` number (double) optional Example: `0.003` Unit-based pricing for non-token models (e.g., Fal AI image/video/audio generation, speech models). At most one of these is typically populated per model. Token-based models (chat, embeddings) leave all of these at 0 and populate input_price_per_million / output_price_per_million instead. `price_per_megapixel` number (double) optional Example: `3e-05` `price_per_second` number (double) optional Example: `0.0001` `price_per_thousand_characters` number (double) optional Example: `0.015` `price_per_video` number (double) optional Example: `0.05` `reasoning_price_per_million` number (double) optional Example: `0` Price per million reasoning tokens. 0 if the model does not charge separately for reasoning tokens. `text_cache_read_input_price_per_million` number (double) optional Example: `0.05` `text_input_price_per_million` number (double) optional Example: `0.1` Per-million token rates for models that bill text vs image tokens separately (e.g. OpenAI gpt-image-2). Standard chat models leave these at 0 and use input_price_per_million / output_price_per_million instead. Values align with usage token_type / internal/usage.Type string values for each meter. `text_output_price_per_million` number (double) optional Example: `0.2` `pricing_detail` object optional The complete set of prices for a model, covering every available variant. **Show child properties** `variants` array of object optional Each available pricing variant for the model. **Show child properties** `currency` string optional Example: `USD` Currency code for this variant's rates (e.g. `USD`). `label` string optional Example: `Standard` Display name for the variant (e.g. `Standard`, `Fast Mode`, `1M Context`). `mode` string, one of: MODEL_BILLING_MODE_UNSPECIFIED, MODEL_BILLING_MODE_INTERACTIVE, MODEL_BILLING_MODE_BATCH optional Example: `MODEL_BILLING_MODE_UNSPECIFIED` Whether rates apply to real-time or batch requests. - MODEL_BILLING_MODE_INTERACTIVE: Real-time request pricing. - MODEL_BILLING_MODE_BATCH: Discounted pricing for asynchronous batch requests. `prices` object optional Pricing per million tokens (aligns with existing ModelPrice pattern) *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `scaled_pricing` object optional Pricing that varies over time. When present, the rates move between the low and high bounds below across the intervals in the schedule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier` string (enum) optional Example: `MODEL_PRICING_TIER_UNSPECIFIED` A pricing variant of a model, such as a faster serving option or a larger context window. - MODEL_PRICING_TIER_STANDARD: Default pricing. - MODEL_PRICING_TIER_FAST_MODE: Faster, higher-priority serving at a premium price. - MODEL_PRICING_TIER_EXTENDED_1M: Pricing for the 1M-token context window. - MODEL_PRICING_TIER_EXTENDED_272K: Pricing for the 272K-token context window. - MODEL_PRICING_TIER_BYOK: Pricing when using your own model API key. `products` array of string, one of: MODEL_CATALOG_PRODUCT_UNSPECIFIED, MODEL_CATALOG_PRODUCT_EVALUATIONS_JUDGE, MODEL_CATALOG_PRODUCT_HARNESS_RUNTIME, MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE optional Example: `["MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE"]` `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["low"]` Supported reasoning effort levels, such as low, medium, and high. `scaled_pricing_enabled` boolean optional Example: `true` True when this model's pricing varies over time. `serving` array of string, one of: MODEL_SERVING_UNSPECIFIED, MODEL_SERVING_SERVERLESS, MODEL_SERVING_DEDICATED optional Example: `["MODEL_SERVING_SERVERLESS"]` `short_description` string optional Example: `"Fast, efficient model for general tasks"` `supported_endpoints` array of string (enum) optional Example: `["MODEL_SUPPORTED_ENDPOINT_CHAT_COMPLETIONS"]` Inference endpoints this model serves, such as chat completions or responses. Empty for Inference Router presets. `supports_temperature` boolean optional Example: `true` Whether the inference request schema includes a temperature field. `temperature` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `thinking` boolean optional Example: `true` Whether the model supports extended thinking. `top_p` object optional Numeric range with min, max, and default values for model tuning parameters. **Show child properties** `default` number (double) optional Example: `123` `max` number (double) optional Example: `123` `min` number (double) optional Example: `123` `type` string optional Example: `"chat"` Catalog model type, such as chat or embedding. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "data": { "badges": [ "MODEL_CATALOG_BADGE_FEATURED" ], "capabilities": [ "tool_calling" ], "code_snippets": { "curl": "example string", "javascript": "example string", "python": "example string", "sdk": "example string" }, "context_window": "128000", "created_at": "2021-01-01T00:00:00Z", "creator": "\"Meta\"", "description": "\"Claude Sonnet 4 is Anthropic's most capable model...\"", "huggingface_repo_id": "\"meta-llama/Llama-3.3-70B-Instruct\"", "id": "\"506a3371-88d0-4047-9212-e2079497ac68\"", "input_modality": [ "MODEL_MODALITY_TEXT" ], "item_type": "MODEL_CATALOG_ITEM_TYPE_UNSPECIFIED", "liveliness": { "overall_status": "\"ok\"", "source": "\"canary\"" }, "max_output_tokens": "65536", "max_tokens": { "default": 123, "max": 123, "min": 123 }, "model_id": "\"llama3.1-70b-instruct\"", "name": "\"Llama 3.1 70B\"", "output_modality": [ "MODEL_MODALITY_TEXT" ], "parameter_count_in_billions": 70, "performance": { "e2e_latency_p50_seconds": 0.42, "e2e_latency_p75_seconds": 0.9, "e2e_latency_p95_seconds": 1.9, "samples": 168, "status": "\"ok\"", "throughput_p50_tok_per_s": 48.5, "throughput_p75_tok_per_s": 60, "throughput_p95_tok_per_s": 72, "ttft_p50_seconds": 0.18, "ttft_p75_seconds": 0.3, "ttft_p95_seconds": 0.55, "window_days": 7 }, "pricing": { "cache_read_input_price_per_million": 0.15, "cache_write_1h_input_price_per_million": 10, "cache_write_5m_input_price_per_million": 6.25, "image_cache_read_input_price_per_million": 0.08, "image_input_price_per_million": 0.3, "image_output_price_per_million": 0.4, "input_cache_read": 0.15, "input_price_per_million": 0.6, "output_price_per_million": 0.9, "price_per_audio": 0.002, "price_per_image": 0.003, "price_per_megapixel": 0.00003, "price_per_second": 0.0001, "price_per_thousand_characters": 0.015, "price_per_video": 0.05, "reasoning_price_per_million": 0, "text_cache_read_input_price_per_million": 0.05, "text_input_price_per_million": 0.1, "text_output_price_per_million": 0.2 }, "pricing_detail": { "variants": [] }, "products": [ "MODEL_CATALOG_PRODUCT_EVALUATION_CANDIDATE" ], "provider": "MODEL_PROVIDER_DIGITALOCEAN", "reasoning_efforts": [ "low" ], "scaled_pricing_enabled": true, "serving": [ "MODEL_SERVING_SERVERLESS" ], "short_description": "\"Fast, efficient model for general tasks\"", "supported_endpoints": [ "MODEL_SUPPORTED_ENDPOINT_CHAT_COMPLETIONS" ], "supports_temperature": true, "temperature": { "default": 123, "max": 123, "min": 123 }, "thinking": true, "top_p": { "default": 123, "max": 123, "min": 123 }, "type": "\"chat\"" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Routers `/v2/gen-ai/models/routers` To list model routers, send a GET request to `/v2/gen-ai/models/routers`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/models/routers` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers?page=1&per_page=20" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `model_routers` array of object optional The model routers **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `task_slug` string optional Example: `"summarization"` Task slug `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "model_routers": [ { "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Model Router `/v2/gen-ai/models/routers` To create a model router, send a POST request to `/v2/gen-ai/models/routers`. #### Request Body: `application/json` `description` string optional Example: `"My Model Router Description"` Model router description `fallback_models` array of string optional Example: `["example string"]` At least one fallback model is required; order defines failover priority `name` string optional Example: `"my-model-router"` Model router name: lowercase, at most 255 characters, only a-z, 0-9, and hyphens `policies` array of object optional Router policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. **Show child properties** `description` string optional Example: `"Summarize long-form text"` Short task description `name` string optional Example: `"Custom Summarization"` Task name `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. **Show child properties** `prefer` string optional Example: `"cheapest"` One of: none, cheapest, fastest `task_slug` string optional Example: `"summarization"` Task slug `regions` array of string optional Example: `["example string"]` DEPRECATED: this field does not affect deployment and model routers are always deployed to all regions. Must be omitted or set to \["all"]. ##### Request: `/v2/gen-ai/models/routers` ### Payload Content type `application/json` ```json { "description": "\"My Model Router Description\"", "fallback_models": [ "example string" ], "name": "\"my-model-router\"", "policies": [ { "models": [ "example string" ], "task_slug": "\"summarization\"" } ], "regions": [ "example string" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers" \ -d '{ "name": "My Model Router", "description": "Routes chat traffic across multiple models", "regions": ["tor1"], "fallback_models": ["openai-gpt-5.4", "kimi-k2.5"], "policies": [ { "task_slug": "summarization", "models": ["openai-gpt-5.4", "kimi-k2.5"], "selection_policy": { "prefer": "cheapest" } } ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `task_slug` string optional Example: `"summarization"` Task slug `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "model_router": { "config": { "fallback_models": [ "example string" ], "policies": [] }, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Router Presets `/v2/gen-ai/models/routers/presets` To list model router presets, send a GET request to `/v2/gen-ai/models/routers/presets`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/models/routers/presets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers/presets?page=1&per_page=20" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `presets` array of object optional The model router presets **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `task_slug` string optional Example: `"summarization"` Task slug `display_name` string optional Example: `example name` Display name for UI surfaces `long_description` string optional Example: `example string` Long description for details views `short_description` string optional Example: `example string` Short description for list views `slug` string optional Example: `example string` Stable slug for routing usage **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "presets": [ { "display_name": "example name", "long_description": "example string", "short_description": "example string", "slug": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Model Router Task Presets `/v2/gen-ai/models/routers/tasks/presets` To list model router task presets, send a GET request to `/v2/gen-ai/models/routers/tasks/presets`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/models/routers/tasks/presets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers/tasks/presets?page=1&per_page=20" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `tasks` array of object optional The task presets **Show child properties** `category` string optional Example: `example string` Higher-level grouping used by the UI `description` string optional Example: `example string` Task description `models` array of string optional Example: `["example string"]` Default models assigned to this task `name` string optional Example: `example name` Display name `selection_policy` object optional Selection policy preference for choosing among assigned models. **Show child properties** `prefer` string optional Example: `"cheapest"` One of: none, cheapest, fastest `tags` array of string optional Example: `["example string"]` Lightweight labels for filtering `task_slug` string optional Example: `example string` Task slug **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "tasks": [ { "category": "example string", "description": "example string", "models": [ "example string" ], "name": "example name", "tags": [ "example string" ], "task_slug": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Model Router `/v2/gen-ai/models/routers/{uuid}` To retrieve details of a model router, send a GET request to `/v2/gen-ai/models/routers/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Model router id ##### Request: `/v2/gen-ai/models/routers/{uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `task_slug` string optional Example: `"summarization"` Task slug `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "model_router": { "config": { "fallback_models": [ "example string" ], "policies": [] }, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Model Router `/v2/gen-ai/models/routers/{uuid}` To update a model router, send a PUT request to `/v2/gen-ai/models/routers/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Model router id #### Request Body: `application/json` `description` string optional Example: `"My Model Router Description"` Model router description `fallback_models` array of object optional `name` string optional Example: `"my-model-router"` Model router name: lowercase, at most 255 characters, only a-z, 0-9, and hyphens `policies` array of object optional Router policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. **Show child properties** `description` string optional Example: `"Summarize long-form text"` Short task description `name` string optional Example: `"Custom Summarization"` Task name `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. **Show child properties** `prefer` string optional Example: `"cheapest"` One of: none, cheapest, fastest `task_slug` string optional Example: `"summarization"` Task slug `regions` array of string optional Example: `["example string"]` DEPRECATED: this field does not affect deployment and model routers are always deployed to all regions. Must be omitted or set to \["all"]. `uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Model router id ##### Request: `/v2/gen-ai/models/routers/{uuid}` ### Payload Content type `application/json` ```json { "description": "\"My Model Router Description\"", "fallback_models": [], "name": "\"my-model-router\"", "policies": [ { "models": [ "example string" ], "task_slug": "\"summarization\"" } ], "regions": [ "example string" ], "uuid": "\"12345678-1234-1234-1234-123456789012\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012" \ -d '{ "name": "My Model Router", "description": "Updated router description", "regions": ["tor1"], "fallback_models": ["openai-gpt-5.4", "kimi-k2.5"], "policies": [ { "task_slug": "summarization", "models": ["openai-gpt-5.4"], "selection_policy": { "prefer": "cheapest" } } ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies **Show child properties** `custom_task` object optional Task definition embedded in a model router config. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `models` array of string optional Example: `["example string"]` Models assigned to the task `selection_policy` object optional Selection policy preference for choosing among assigned models. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `task_slug` string optional Example: `"summarization"` Task slug `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "model_router": { "config": { "fallback_models": [ "example string" ], "policies": [] }, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "name": "example name", "regions": [ "example string" ], "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Model Router `/v2/gen-ai/models/routers/{uuid}` To delete a model router, send a DELETE request to `/v2/gen-ai/models/routers/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Model router id ##### Request: `/v2/gen-ai/models/routers/{uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/models/routers/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The id of the deleted model router **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Get Oauth2 Dropbox Tokens `/v2/gen-ai/oauth2/dropbox/tokens` To obtain the refresh token, needed for creation of data sources, send a GET request to `/v2/gen-ai/oauth2/dropbox/tokens`. Pass the code you obtrained from the oauth flow in the field 'code' #### Request Body: `application/json` `code` string optional Example: `example string` The oauth2 code from google `redirect_url` string optional Example: `example string` Redirect url ##### Request: `/v2/gen-ai/oauth2/dropbox/tokens` ### Payload Content type `application/json` ```json { "code": "example string", "redirect_url": "example string" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/oauth2/dropbox/tokens?code=" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `refresh_token` string optional Example: `example string` The refresh token `token` string optional Example: `example string` The access token **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "refresh_token": "example string", "token": "example string" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Oauth2 URL `/v2/gen-ai/oauth2/url` To generate an Oauth2-URL for use with your localhost, send a GET request to `/v2/gen-ai/oauth2/url`. Pass 'http://localhost:3000 as redirect_url #### Query Parameters `type` string optional Example: `"example string"` Type "google" / "dropbox". `redirect_url` string optional Example: `"example string"` The redirect url. ##### Request: `/v2/gen-ai/oauth2/url` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/oauth2/url?type=google&redirect_uri=http://localhost:3000" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `url` string optional Example: `example string` The oauth2 url **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "url": "example string" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List OpenAI API Keys `/v2/gen-ai/openai/keys` To list all OpenAI API keys, send a GET request to `/v2/gen-ai/openai/keys`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/openai/keys` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_infos": [ { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create OpenAI API Key `/v2/gen-ai/openai/keys` To create an OpenAI API key, send a POST request to `/v2/gen-ai/openai/keys`. #### Request Body: `application/json` `api_key` string optional Example: `"sk-proj--123456789098765432123456789"` OpenAI API key `name` string optional Example: `"Production Key"` Name of the key ##### Request: `/v2/gen-ai/openai/keys` ### Payload Content type `application/json` ```json { "api_key": "\"sk-proj--123456789098765432123456789\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys" \ -d '{ "api_key": "sk-proj--12345678901234567890123456789012", "name": "test-key" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get OpenAI API Key `/v2/gen-ai/openai/keys/{api_key_uuid}` To retrieve details of an OpenAI API key, send a GET request to `/v2/gen-ai/openai/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/openai/keys/{api_key_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update OpenAI API Key `/v2/gen-ai/openai/keys/{api_key_uuid}` To update an OpenAI API key, send a PUT request to `/v2/gen-ai/openai/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID #### Request Body: `application/json` `api_key` string optional Example: `"sk-ant-12345678901234567890123456789012"` OpenAI API key `api_key_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` API key ID `name` string optional Example: `"Production Key"` Name of the key ##### Request: `/v2/gen-ai/openai/keys/{api_key_uuid}` ### Payload Content type `application/json` ```json { "api_key": "\"sk-ant-12345678901234567890123456789012\"", "api_key_uuid": "\"12345678-1234-1234-1234-123456789012\"", "name": "\"Production Key\"" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" \ -d '{ "api_key_uuid": "11efb7d6-cdb5-6388-bf8f-4e013e2ddde4", "name": "test-key2" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete OpenAI API Key `/v2/gen-ai/openai/keys/{api_key_uuid}` To delete an OpenAI API key, send a DELETE request to `/v2/gen-ai/openai/keys/{api_key_uuid}`. #### Path Parameters `api_key_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` API key ID ##### Request: `/v2/gen-ai/openai/keys/{api_key_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `api_key_info` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "api_key_info": { "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "deleted_at": "2023-01-01T00:00:00Z", "models": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List agents by OpenAI key `/v2/gen-ai/openai/keys/{uuid}/agents` List Agents by OpenAI Key. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Unique ID of OpenAI key #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/openai/keys/{uuid}/agents` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/openai/keys/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agents` array of object optional **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agents": [ { "api_key_infos": [], "api_keys": [], "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "max_tokens": 123, "mcp_servers": [], "name": "example name", "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Datacenter Regions `/v2/gen-ai/regions` To list all datacenter regions, send a GET request to `/v2/gen-ai/regions`. #### Query Parameters `serves_inference` boolean optional Example: `true` Include datacenters that serve inference. `serves_batch` boolean optional Example: `true` Include datacenters that are capable of running batch jobs. ##### Request: `/v2/gen-ai/regions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/regions" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `regions` array of object optional Region code **Show child properties** `inference_url` string optional Example: `example string` Url for inference server `region` string optional Example: `example string` Region code `serves_batch` boolean optional Example: `true` This datacenter is capable of running batch jobs `serves_inference` boolean optional Example: `true` This datacenter is capable of serving inference `stream_inference_url` string optional Example: `example string` The url for the inference streaming server **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "regions": [ { "inference_url": "example string", "region": "example string", "serves_batch": true, "serves_inference": true, "stream_inference_url": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Common Scenario & Goal Library `/v2/gen-ai/scenario_library` To list the platform-curated Common Scenario & Goal Library, send a GET request to `/v2/gen-ai/scenario_library`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `category` string optional Example: `example string` Filter by category (exact match). Empty means no category filter. `search` string optional Example: `example string` Free-text search across name, description, and goal_description (case-insensitive substring match). Empty means no search. `sort_by` string, one of: SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED, SCENARIO_LIBRARY_SORT_FIELD_NAME, SCENARIO_LIBRARY_SORT_FIELD_CREATED_AT optional Example: `SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to name when unspecified. - SCENARIO_LIBRARY_SORT_FIELD_NAME: Sort by customer-facing name (case-insensitive). Default. - SCENARIO_LIBRARY_SORT_FIELD_CREATED_AT: Sort by creation date. Default: `SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to ascending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/scenario_library` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_library" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_categories` array of string optional Example: `["example string"]` Categories currently in use, for filtering library results. `available_sort_by` array of string, one of: SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED, SCENARIO_LIBRARY_SORT_FIELD_NAME, SCENARIO_LIBRARY_SORT_FIELD_CREATED_AT optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `scenarios` array of object optional The library entries for the current page. **Show child properties** `category` string optional Example: `example string` Optional grouping for catalog browsing (e.g. "Billing", "Onboarding"). Empty when uncategorized. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `description` string optional Example: `example string` Curated description. `goal_description` string optional Example: `example string` The goal this scenario set demonstrates, shown as context alongside goal-driven generation. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the library entry. `name` string optional Example: `example name` Curated display name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the library entry. `status` string, one of: SCENARIO_LIBRARY_ENTRY_STATUS_UNSPECIFIED, SCENARIO_LIBRARY_ENTRY_STATUS_ACTIVE, SCENARIO_LIBRARY_ENTRY_STATUS_ARCHIVED optional Example: `SCENARIO_LIBRARY_ENTRY_STATUS_UNSPECIFIED` Lifecycle status of a Common Scenario & Goal Library entry. - SCENARIO_LIBRARY_ENTRY_STATUS_ACTIVE: Visible in the library and available to copy into a scenario set. - SCENARIO_LIBRARY_ENTRY_STATUS_ARCHIVED: Hidden from the library catalog. Existing scenario sets created from this entry keep their provenance. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_categories": [ "example string" ], "available_sort_by": [ "SCENARIO_LIBRARY_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "scenarios": [ { "category": "example string", "created_at": "2023-01-01T00:00:00Z", "description": "example string", "goal_description": "example string", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "status": "SCENARIO_LIBRARY_ENTRY_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Scenario Set From Library `/v2/gen-ai/scenario_library/{library_scenario_uuid}/create_scenario_set` To create a scenario set from a Common Scenario & Goal Library entry, send a POST request to `/v2/gen-ai/scenario_library/{library_scenario_uuid}/create_scenario_set`. The library scenarios are copied into a new scenario set owned by the calling team. The new set is ready to use when creating a simulation run. #### Path Parameters `library_scenario_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the library entry to copy. #### Request Body: `application/json` `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the library entry to copy. `name` string optional Example: `example name` Optional name for the new scenario set. Defaults to the library entry's name when unset. ##### Request: `/v2/gen-ai/scenario_library/{library_scenario_uuid}/create_scenario_set` ### Payload Content type `application/json` ```json { "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_library/12345678-1234-1234-1234-123456789012/create_scenario_set" \ -d '{ "library_scenario_uuid": "12345678-1234-1234-1234-123456789012", "name": "Billing Refund Escalation" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Scenarios In Library Entry `/v2/gen-ai/scenario_library/{library_scenario_uuid}/scenarios` To list the scenarios inside a Common Scenario & Goal Library entry without creating a team-owned scenario set, send a GET request to `/v2/gen-ai/scenario_library/{library_scenario_uuid}/scenarios`. #### Path Parameters `library_scenario_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the library entry to read. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `search` string optional Example: `example string` Free-text search across name, description, and user_persona (case-insensitive substring match). Empty means no search. `sort_by` string, one of: SCENARIO_SORT_FIELD_UNSPECIFIED, SCENARIO_SORT_FIELD_FILE_ORDER, SCENARIO_SORT_FIELD_NAME, SCENARIO_SORT_FIELD_DESCRIPTION optional Example: `SCENARIO_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to original file order when unspecified. - SCENARIO_SORT_FIELD_FILE_ORDER: Preserve original file order. Default. - SCENARIO_SORT_FIELD_NAME: Sort by scenario name (case-insensitive). Empty names sort last. - SCENARIO_SORT_FIELD_DESCRIPTION: Sort by scenario description (case-insensitive). Default: `SCENARIO_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to ascending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/scenario_library/{library_scenario_uuid}/scenarios` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_library/12345678-1234-1234-1234-123456789012/scenarios" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_sort_by` array of string, one of: SCENARIO_SORT_FIELD_UNSPECIFIED, SCENARIO_SORT_FIELD_FILE_ORDER, SCENARIO_SORT_FIELD_NAME, SCENARIO_SORT_FIELD_DESCRIPTION optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `scenarios` array of object optional The scenarios for the current page. **Show child properties** `description` string optional Example: `example string` What the user tries to accomplish. Required. `exploration_budget` integer (int64) optional Example: `123` Number of episodes to explore for this scenario. Defaults to 1 if unset. `max_turns` integer (int64) optional Example: `123` Turn budget for the scenario. Falls back to the run-level default if unset. `name` string optional Example: `example name` Human-readable name for the scenario. Optional. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for the scenario. Always generated by the API; any customer-supplied value is ignored and overwritten. `stopping_criteria` array of string optional Example: `["example string"]` Judge stopping criteria. Required; must contain at least one entry. `user_persona` string optional Example: `example string` How the user communicates (tone, role). Optional. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_sort_by": [ "SCENARIO_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "scenarios": [ { "description": "example string", "exploration_budget": 123, "max_turns": 123, "name": "example name", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "stopping_criteria": [ "example string" ], "user_persona": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Scenario Sets `/v2/gen-ai/scenario_sets` To list scenario sets, send a GET request to `/v2/gen-ai/scenario_sets`. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `statuses` array of string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `["SCENARIO_SET_STATUS_READY"]` Filter by one or more statuses. Empty means no status filter. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `source_kinds` array of string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `["SCENARIO_SET_SOURCE_KIND_USER_UPLOAD"]` Filter by one or more source kinds. Empty means no source-kind filter. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `search` string optional Example: `example string` Free-text search across name and description (case-insensitive substring match). Empty means no search. `sort_by` string (enum) optional Example: `SCENARIO_SET_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to creation date when unspecified. - SCENARIO_SET_SORT_FIELD_CREATED_AT: Sort by creation date. Default. - SCENARIO_SET_SORT_FIELD_NAME: Sort by customer-supplied name (case-insensitive). - SCENARIO_SET_SORT_FIELD_STATUS: Sort by status using lifecycle order (generating → ready → terminal). - SCENARIO_SET_SORT_FIELD_SCENARIO_COUNT: Sort by scenario_count. - SCENARIO_SET_SORT_FIELD_UPDATED_AT: Sort by last update date. Default: `SCENARIO_SET_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to descending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/scenario_sets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_sort_by` array of string (enum) optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `available_source_kinds` array of string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Source kinds available for filtering this list request. `available_statuses` array of string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Statuses available for filtering this list request. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `scenario_sets` array of object optional The scenario sets for the current page. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_sort_by": [ "SCENARIO_SET_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "available_source_kinds": [ "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED" ], "available_statuses": [ "SCENARIO_SET_STATUS_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "scenario_sets": [ { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Scenario Set `/v2/gen-ai/scenario_sets` To create a scenario set, send a POST request to `/v2/gen-ai/scenario_sets`. Provide exactly one of `scenarios` or `file_upload_scenario_set`. The set is created in the ready state. #### Request Body: `application/json` `file_upload_scenario_set` object optional Uploaded scenario file to ingest. Provide this or `scenarios`, not both. `name` string optional Example: `support-agent-scenarios` The name of the scenario set. `scenarios` array of object optional Inline scenarios. Provide this or `file_upload_scenario_set`, not both. **Show child properties** `description` string optional Example: `example string` What the user tries to accomplish. Required. `exploration_budget` integer (int64) optional Example: `123` Number of episodes to explore for this scenario. Defaults to 1 if unset. `max_turns` integer (int64) optional Example: `123` Turn budget for the scenario. Falls back to the run-level default if unset. `name` string optional Example: `example name` Human-readable name for the scenario. Optional. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for the scenario. Always generated by the API; any customer-supplied value is ignored and overwritten. `stopping_criteria` array of string optional Example: `["example string"]` Judge stopping criteria. Required; must contain at least one entry. `user_persona` string optional Example: `example string` How the user communicates (tone, role). Optional. ##### Request: `/v2/gen-ai/scenario_sets` ### Payload Content type `application/json` ```json { "file_upload_scenario_set": { "original_file_name": "example name", "size_in_bytes": "12345", "stored_object_key": "example string" }, "name": "support-agent-scenarios", "scenarios": [ { "description": "example string", "exploration_budget": 123, "max_turns": 123, "name": "example name", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "stopping_criteria": [ "example string" ], "user_persona": "example string" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets" \ -d '{ "name": "support-agent-scenarios", "scenarios": [ { "name": "Refund request", "description": "The user wants a refund for a delayed order", "user_persona": "Frustrated customer", "stopping_criteria": ["Refund is approved or a next step is clearly offered"], "max_turns": 8 } ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Presigned URLs for Scenario Set File Upload `/v2/gen-ai/scenario_sets/file_upload_presigned_urls` To create presigned URLs for uploading a scenario set file, send a POST request to `/v2/gen-ai/scenario_sets/file_upload_presigned_urls`. After uploading, pass the stored object in Create Scenario Set as `file_upload_scenario_set`. #### Request Body: `application/json` `files` array of object optional A list of files to generate presigned URLs for. **Show child properties** `file_name` string optional Example: `example name` Local filename `file_size` string (int64) optional Example: `12345` The size of the file in bytes. ##### Request: `/v2/gen-ai/scenario_sets/file_upload_presigned_urls` ### Payload Content type `application/json` ```json { "files": [ { "file_name": "example name", "file_size": "12345" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/file_upload_presigned_urls" \ -d '{ "files": [{ "file_name": "scenarios.jsonl", "file_size": 2048 }] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `request_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The ID generated for the request for Presigned URLs. `uploads` array of object optional A list of generated presigned URLs and object keys, one per file. **Show child properties** `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the url expires at. `object_key` string optional Example: `example string` The unique object key to store the file as. `original_file_name` string optional Example: `example name` The original file name. `presigned_url` string optional Example: `example string` The actual presigned URL the client can use to upload the file directly. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "request_id": "123e4567-e89b-12d3-a456-426614174000", "uploads": [ { "expires_at": "2023-01-01T00:00:00Z", "object_key": "example string", "original_file_name": "example name", "presigned_url": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Generate Scenario Set `/v2/gen-ai/scenario_sets/generate` To dispatch goal-driven scenario generation, send a POST request to `/v2/gen-ai/scenario_sets/generate`. The scenario set is returned in the generating state. Poll the retrieve scenario set endpoint until the set reaches a ready, failed, or cancelled status. #### Request Body: `application/json` `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional model to use for generation. Platform default when unset. `goal_description` string optional Example: `Test how the agent handles refund requests` The goal that drives scenario generation. `name` string optional Example: `billing-support-generated` The name of the scenario set to create. `num_scenarios` integer (int64) optional Example: `123` Number of scenarios to generate. Defaults to 1 if unset. ##### Request: `/v2/gen-ai/scenario_sets/generate` ### Payload Content type `application/json` ```json { "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "goal_description": "Test how the agent handles refund requests", "name": "billing-support-generated", "num_scenarios": 123 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/generate" \ -d '{ "name": "billing-support-generated", "goal_description": "Test how the agent handles refund requests", "num_scenarios": 4 }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Scenario Set `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` To retrieve a scenario set, send a GET request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}`. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set. ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/123e4567-e89b-12d3-a456-426614174000" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Scenario Set `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` To update a scenario set in place, send a PUT request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}`. Provide a new `name` and/or replacement `scenarios`. At least one is required. Replacing contents keeps the same scenario set UUID, remints scenario UUIDs, and is rejected unless the set is ready and no simulation run references it. There is no file-upload path on update. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set to update. Returned by `CreateScenarioSet` and listed via `ListScenarioSets`. #### Request Body: `application/json` `name` string optional Example: `example name` Optional new name. When set, must be non-empty and at most 255 characters. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set to update. `scenarios` array of object optional Optional inline scenarios to replace the set contents. At least one of name or scenarios is required. **Show child properties** `description` string optional Example: `example string` What the user tries to accomplish. Required. `exploration_budget` integer (int64) optional Example: `123` Number of episodes to explore for this scenario. Defaults to 1 if unset. `max_turns` integer (int64) optional Example: `123` Turn budget for the scenario. Falls back to the run-level default if unset. `name` string optional Example: `example name` Human-readable name for the scenario. Optional. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for the scenario. Always generated by the API; any customer-supplied value is ignored and overwritten. `stopping_criteria` array of string optional Example: `["example string"]` Judge stopping criteria. Required; must contain at least one entry. `user_persona` string optional Example: `example string` How the user communicates (tone, role). Optional. ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` ### Payload Content type `application/json` ```json { "name": "example name", "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenarios": [ { "description": "example string", "exploration_budget": 123, "max_turns": 123, "name": "example name", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "stopping_criteria": [ "example string" ], "user_persona": "example string" } ] } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/12345678-1234-1234-1234-123456789012" \ -d '{ "name": "My new scenario set name" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Scenario Set `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` To delete a scenario set, send a DELETE request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}`. A scenario set that is referenced by a simulation run cannot be deleted. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set to delete. Returned by `CreateScenarioSet` and listed via `ListScenarioSets`. A set still referenced by a simulation run cannot be deleted. ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the deleted scenario set. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Scenario Set Download URL `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/download_url` To retrieve a presigned download URL for a scenario set file, send a GET request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/download_url`. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set. ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/download_url` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/12345678-1234-1234-1234-123456789012/download_url" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `download_url` string optional Example: `example string` The presigned URL to download the scenario set file. `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the URL expires at. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "download_url": "example string", "expires_at": "2023-01-01T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Duplicate Scenario Set `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/duplicate` To duplicate a scenario set, send a POST request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/duplicate`. The source set must be ready. The new set is named `{original name} duplicate` and contains a copy of the source scenarios. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set to duplicate. #### Request Body: `application/json` `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set to duplicate. ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/duplicate` ### Payload Content type `application/json` ```json { "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/12345678-1234-1234-1234-123456789012/duplicate" \ -d '{ "scenario_set_uuid": "12345678-1234-1234-1234-123456789012" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_set` object optional A team-owned collection of scenarios. **Show child properties** `bucket_name` string optional Example: `example name` Object storage bucket holding the scenario file. Unset while status is generating. `bucket_region` string optional Example: `example string` Object storage bucket region. Unset while status is generating. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the scenario set has been deleted. `description` string optional Example: `example string` Customer-supplied description. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `generator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model that produced the scenarios. Only set for goal-generated scenario sets. `library_scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the source library entry. Only set for library scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_LIBRARY`). `name` string optional Example: `example name` Customer-supplied name. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the set. Unset while status is generating. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set. `source_export_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Signals export UUID that produced this set. Only set for signal-generated scenario sets (`source_kind=SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED`). `source_goal_description` string optional Example: `example string` The goal that drove generation. Only set for goal_generated scenario sets. `source_kind` string, one of: SCENARIO_SET_SOURCE_KIND_UNSPECIFIED, SCENARIO_SET_SOURCE_KIND_USER_UPLOAD, SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED, SCENARIO_SET_SOURCE_KIND_LIBRARY, SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED optional Example: `SCENARIO_SET_SOURCE_KIND_UNSPECIFIED` How a scenario set was created. - SCENARIO_SET_SOURCE_KIND_USER_UPLOAD: Created from uploaded or inline scenarios. - SCENARIO_SET_SOURCE_KIND_GOAL_GENERATED: Produced by goal-driven generation. - SCENARIO_SET_SOURCE_KIND_LIBRARY: Copied from a platform-curated library entry. - SCENARIO_SET_SOURCE_KIND_SIGNAL_GENERATED: Produced from a completed Signals export. `spaces_key` string optional Example: `example string` Object storage key for the scenario file. Unset while status is generating. `status` string, one of: SCENARIO_SET_STATUS_UNSPECIFIED, SCENARIO_SET_STATUS_GENERATING, SCENARIO_SET_STATUS_READY, SCENARIO_SET_STATUS_FAILED, SCENARIO_SET_STATUS_CANCELLED optional Example: `SCENARIO_SET_STATUS_UNSPECIFIED` Lifecycle status of a scenario set. Uploaded sets are created as ready. Generated sets start as generating and then become ready, failed, or cancelled. - SCENARIO_SET_STATUS_GENERATING: Generation is in progress. The scenarios are not ready yet. - SCENARIO_SET_STATUS_READY: The scenario set is ready to use. - SCENARIO_SET_STATUS_FAILED: Generation failed. The scenario set has no readable scenarios. - SCENARIO_SET_STATUS_CANCELLED: Generation was cancelled before completion. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the generation workflow. Only set for goal-generated scenario sets. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_set": { "bucket_name": "example name", "bucket_region": "example string", "created_at": "2023-01-01T00:00:00Z", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "failure_reason": "example string", "generator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "library_scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "source_export_id": "123e4567-e89b-12d3-a456-426614174000", "source_goal_description": "example string", "source_kind": "SCENARIO_SET_SOURCE_KIND_UNSPECIFIED", "spaces_key": "example string", "status": "SCENARIO_SET_STATUS_UNSPECIFIED", "updated_at": "2023-01-01T00:00:00Z", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Scenarios `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/scenarios` To list the scenarios in a scenario set, send a GET request to `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/scenarios`. #### Path Parameters `scenario_set_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scenario set to read. #### Query Parameters `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `search` string optional Example: `example string` Free-text search across name, description, and user_persona (case-insensitive substring match). Empty means no search. `sort_by` string, one of: SCENARIO_SORT_FIELD_UNSPECIFIED, SCENARIO_SORT_FIELD_FILE_ORDER, SCENARIO_SORT_FIELD_NAME, SCENARIO_SORT_FIELD_DESCRIPTION optional Example: `SCENARIO_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to original file order when unspecified. - SCENARIO_SORT_FIELD_FILE_ORDER: Preserve original file order. Default. - SCENARIO_SORT_FIELD_NAME: Sort by scenario name (case-insensitive). Empty names sort last. - SCENARIO_SORT_FIELD_DESCRIPTION: Sort by scenario description (case-insensitive). Default: `SCENARIO_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to ascending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/scenario_sets/{scenario_set_uuid}/scenarios` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/scenario_sets/12345678-1234-1234-1234-123456789012/scenarios" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_sort_by` array of string, one of: SCENARIO_SORT_FIELD_UNSPECIFIED, SCENARIO_SORT_FIELD_FILE_ORDER, SCENARIO_SORT_FIELD_NAME, SCENARIO_SORT_FIELD_DESCRIPTION optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `scenarios` array of object optional The scenarios for the current page. **Show child properties** `description` string optional Example: `example string` What the user tries to accomplish. Required. `exploration_budget` integer (int64) optional Example: `123` Number of episodes to explore for this scenario. Defaults to 1 if unset. `max_turns` integer (int64) optional Example: `123` Turn budget for the scenario. Falls back to the run-level default if unset. `name` string optional Example: `example name` Human-readable name for the scenario. Optional. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for the scenario. Always generated by the API; any customer-supplied value is ignored and overwritten. `stopping_criteria` array of string optional Example: `["example string"]` Judge stopping criteria. Required; must contain at least one entry. `user_persona` string optional Example: `example string` How the user communicates (tone, role). Optional. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_sort_by": [ "SCENARIO_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "scenarios": [ { "description": "example string", "exploration_budget": 123, "max_turns": 123, "name": "example name", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "stopping_criteria": [ "example string" ], "user_persona": "example string" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create scheduled indexing for knowledge base `/v2/gen-ai/scheduled-indexing` To create scheduled indexing for a knowledge base, send a POST request to `/v2/gen-ai/scheduled-indexing`. #### Request Body: `application/json` `days` array of integer (int32) optional Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 ) `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base uuid for which the schedule is created `time` string optional Example: `example string` Time of execution (HH:MM) UTC ##### Request: `/v2/gen-ai/scheduled-indexing` ### Payload Content type `application/json` ```json { "days": [ 123 ], "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "time": "example string" } ``` ### cURL ```bash curl --location --request POST 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing' \ --header 'Authorization: Bearer $DIGITALOCEAN_TOKEN"' \ --header 'Content-Type: application/json' \ --data '{ "knowledge_base_uuid": "knowledge_base_uuid", "time": "18:00", "days": [ 1, 2, 3 ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `indexing_info` object optional Metadata for scheduled indexing entries **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Created at timestamp `days` array of integer (int32) optional Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 ) `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted at timestamp (if soft deleted) `is_active` boolean optional Example: `true` Whether the schedule is currently active `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base uuid associated with this schedule `last_ran_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last time the schedule was executed `next_run_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Next scheduled run `time` string optional Example: `example string` Scheduled time of execution (HH:MM:SS format) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Updated at timestamp `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the scheduled indexing entry **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "indexing_info": { "created_at": "2023-01-01T00:00:00Z", "days": [ 123 ], "deleted_at": "2023-01-01T00:00:00Z", "is_active": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "last_ran_at": "2023-01-01T00:00:00Z", "next_run_at": "2023-01-01T00:00:00Z", "time": "example string", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Scheduled Indexing for Knowledge Base `/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}` Get Scheduled Indexing for knowledge base using knoweldge base uuid, send a GET request to `/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}`. #### Path Parameters `knowledge_base_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scheduled indexing entry ##### Request: `/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}` ### cURL ```bash curl --location --request GET 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing/knowledge-base/{knowledge_base_uuid}' \ --header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' \ --header 'Content-Type: application/json' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `indexing_info` object optional Metadata for scheduled indexing entries **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Created at timestamp `days` array of integer (int32) optional Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 ) `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted at timestamp (if soft deleted) `is_active` boolean optional Example: `true` Whether the schedule is currently active `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base uuid associated with this schedule `last_ran_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last time the schedule was executed `next_run_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Next scheduled run `time` string optional Example: `example string` Scheduled time of execution (HH:MM:SS format) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Updated at timestamp `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the scheduled indexing entry **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "indexing_info": { "created_at": "2023-01-01T00:00:00Z", "days": [ 123 ], "deleted_at": "2023-01-01T00:00:00Z", "is_active": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "last_ran_at": "2023-01-01T00:00:00Z", "next_run_at": "2023-01-01T00:00:00Z", "time": "example string", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Scheduled Indexing `/v2/gen-ai/scheduled-indexing/{uuid}` Delete Scheduled Indexing for knowledge base, send a DELETE request to `/v2/gen-ai/scheduled-indexing/{uuid}`. #### Path Parameters `uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the scheduled indexing ##### Request: `/v2/gen-ai/scheduled-indexing/{uuid}` ### cURL ```bash curl --location --request DELETE 'https://api.digitalocean.com/v2/gen-ai/scheduled-indexing/{scheduled_indexing_id}' \ --header 'Authorization: Bearer $DIGITALOCEAN_TOKEN' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `indexing_info` object optional Metadata for scheduled indexing entries **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Created at timestamp `days` array of integer (int32) optional Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 ) `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted at timestamp (if soft deleted) `is_active` boolean optional Example: `true` Whether the schedule is currently active `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base uuid associated with this schedule `last_ran_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last time the schedule was executed `next_run_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Next scheduled run `time` string optional Example: `example string` Scheduled time of execution (HH:MM:SS format) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Updated at timestamp `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique identifier for the scheduled indexing entry **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "indexing_info": { "created_at": "2023-01-01T00:00:00Z", "days": [ 123 ], "deleted_at": "2023-01-01T00:00:00Z", "is_active": true, "knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000", "last_ran_at": "2023-01-01T00:00:00Z", "next_run_at": "2023-01-01T00:00:00Z", "time": "example string", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Simulation Runs `/v2/gen-ai/simulation_runs` To list simulation runs, send a GET request to `/v2/gen-ai/simulation_runs`. #### Query Parameters `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional filter by scenario set. `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `statuses` array of string (enum) optional Example: `["SIMULATION_RUN_STATUS_RUNNING"]` Filter by one or more statuses. Empty means no status filter. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `search` string optional Example: `example string` Free-text search across the run name and scenario set name (case-insensitive substring match). Empty means no search. `sort_by` string, one of: SIMULATION_RUN_SORT_FIELD_UNSPECIFIED, SIMULATION_RUN_SORT_FIELD_CREATED_AT, SIMULATION_RUN_SORT_FIELD_NAME, SIMULATION_RUN_SORT_FIELD_STATUS, SIMULATION_RUN_SORT_FIELD_UPDATED_AT optional Example: `SIMULATION_RUN_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to creation date when unspecified. - SIMULATION_RUN_SORT_FIELD_CREATED_AT: Sort by creation date. Default. - SIMULATION_RUN_SORT_FIELD_NAME: Sort by customer-supplied run name (case-insensitive). - SIMULATION_RUN_SORT_FIELD_STATUS: Sort by status using lifecycle order (pending → running → terminal). - SIMULATION_RUN_SORT_FIELD_UPDATED_AT: Sort by last update date. Default: `SIMULATION_RUN_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to descending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/simulation_runs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_sort_by` array of string, one of: SIMULATION_RUN_SORT_FIELD_UNSPECIFIED, SIMULATION_RUN_SORT_FIELD_CREATED_AT, SIMULATION_RUN_SORT_FIELD_NAME, SIMULATION_RUN_SORT_FIELD_STATUS, SIMULATION_RUN_SORT_FIELD_UPDATED_AT optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `available_statuses` array of string (enum) optional Statuses available for filtering this list request. `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages `simulation_runs` array of object optional The simulation runs for the current page. **Show child properties** `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `created_by_user_email` string optional Example: `example@example.com` Email of the user who triggered this run. `created_by_user_id` string (uint64) optional Example: `12345` User id of the actor who triggered this run. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the run has been deleted. `episodes_finished` integer (int64) optional Example: `123` Number of episodes that have finished (successfully or not). `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run reserved for this simulation, when the create request included evaluation_config. Empty when no evaluation is attached. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_model_name` string optional Example: `example name` Display name of the judge model (from the model catalog). `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the judge. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `result_summary` object optional Aggregated final result of a simulation run: verdict counts plus token and duration totals. **Show child properties** `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `total_duration_sec` string (uint64) optional Example: `12345` Total wall-clock duration across the run, in seconds. `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the scenario set for this run. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set being executed (must exist at run create). `status` string (enum) optional Example: `SIMULATION_RUN_STATUS_UNSPECIFIED` Lifecycle status of a simulation run. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `total_episodes` integer (int64) optional Example: `123` Total number of episodes (sum of exploration budgets). `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_name` string optional Example: `example name` Display name of the user simulator model (from the model catalog). `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the user simulator. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the workflow executing this run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_sort_by": [ "SIMULATION_RUN_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "available_statuses": [ "SIMULATION_RUN_STATUS_UNSPECIFIED" ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 }, "simulation_runs": [ { "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "deleted_at": "2023-01-01T00:00:00Z", "episodes_finished": 123, "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "exploration_budget": 123, "failure_reason": "example string", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_RUN_STATUS_UNSPECIFIED", "total_episodes": 123, "updated_at": "2023-01-01T00:00:00Z", "user_simulator_model_name": "example name", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Simulation Run `/v2/gen-ai/simulation_runs` To create a simulation run, send a POST request to `/v2/gen-ai/simulation_runs`. The scenario set must be ready. Judge and user simulator models are optional and use platform defaults when omitted. The run is returned in the pending state. #### Request Body: `application/json` `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `evaluation_config` object optional Optional configuration that opts a simulation run into an evaluation. When included on the create-run request, the platform reserves a model_evaluation_run linked to this simulation run and dispatches the evaluation automatically after the simulation finishes. The evaluation reuses the simulation run's judge_model_uuid. **Show child properties** `metric_uuids` array of string optional Example: `["example string"]` Evaluation metric UUIDs (from the evaluation metrics catalog). Must be simulation-eligible (multi-turn) metrics; the create request is rejected if any UUID is unknown or ineligible. `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional model override for the judge. Platform default when unset. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the existing scenario set to execute. The set must be ready. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional model override for the user simulator. Platform default when unset. ##### Request: `/v2/gen-ai/simulation_runs` ### Payload Content type `application/json` ```json { "agent_config": { "agent_deployment_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" }, "evaluation_config": { "metric_uuids": [ "example string" ], "star_metric": { "metric_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name", "success_threshold": 123, "success_threshold_pct": 123 } }, "exploration_budget": 123, "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs" \ -d '{ "name": "my-simulation-run", "scenario_set_uuid": "12345678-1234-1234-1234-123456789012", "agent_config": { "agent_uuid": "223e4567-e89b-12d3-a456-426614174001", "name": "support-agent" }, "judge_model_uuid": "323e4567-e89b-12d3-a456-426614174002", "user_simulator_model_uuid": "423e4567-e89b-12d3-a456-426614174003", "evaluation_config": { "metric_uuids": [ "523e4567-e89b-12d3-a456-426614174004" ], "star_metric": { "metric_uuid": "523e4567-e89b-12d3-a456-426614174004", "success_threshold": 80 } } }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `simulation_run` object optional One execution of a scenario set against a candidate agent. **Show child properties** `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `created_by_user_email` string optional Example: `example@example.com` Email of the user who triggered this run. `created_by_user_id` string (uint64) optional Example: `12345` User id of the actor who triggered this run. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the run has been deleted. `episodes_finished` integer (int64) optional Example: `123` Number of episodes that have finished (successfully or not). `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run reserved for this simulation, when the create request included evaluation_config. Empty when no evaluation is attached. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_model_name` string optional Example: `example name` Display name of the judge model (from the model catalog). `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the judge. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `result_summary` object optional Aggregated final result of a simulation run: verdict counts plus token and duration totals. **Show child properties** `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `total_duration_sec` string (uint64) optional Example: `12345` Total wall-clock duration across the run, in seconds. `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the scenario set for this run. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set being executed (must exist at run create). `status` string (enum) optional Example: `SIMULATION_RUN_STATUS_UNSPECIFIED` Lifecycle status of a simulation run. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `total_episodes` integer (int64) optional Example: `123` Total number of episodes (sum of exploration budgets). `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_name` string optional Example: `example name` Display name of the user simulator model (from the model catalog). `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the user simulator. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the workflow executing this run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "simulation_run": { "agent_config": { "agent_deployment_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" }, "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "deleted_at": "2023-01-01T00:00:00Z", "episodes_finished": 123, "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "exploration_budget": 123, "failure_reason": "example string", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "result_summary": { "total_duration_sec": "12345" }, "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_RUN_STATUS_UNSPECIFIED", "total_episodes": 123, "updated_at": "2023-01-01T00:00:00Z", "user_simulator_model_name": "example name", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Simulation Run `/v2/gen-ai/simulation_runs/{run_uuid}` To retrieve a simulation run, send a GET request to `/v2/gen-ai/simulation_runs/{run_uuid}`. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the simulation run. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/123e4567-e89b-12d3-a456-426614174000" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `scenario_results` array of object optional Per-scenario breakdown of episode outcomes, aggregated from episode rows. **Show child properties** `episodes_finished` integer (int64) optional Example: `123` Episodes that have finished (successfully or not). `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario. `total_episodes` integer (int64) optional Example: `123` Total episodes for this scenario (its exploration budget). `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `simulation_run` object optional One execution of a scenario set against a candidate agent. **Show child properties** `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `created_by_user_email` string optional Example: `example@example.com` Email of the user who triggered this run. `created_by_user_id` string (uint64) optional Example: `12345` User id of the actor who triggered this run. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the run has been deleted. `episodes_finished` integer (int64) optional Example: `123` Number of episodes that have finished (successfully or not). `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run reserved for this simulation, when the create request included evaluation_config. Empty when no evaluation is attached. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_model_name` string optional Example: `example name` Display name of the judge model (from the model catalog). `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the judge. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `result_summary` object optional Aggregated final result of a simulation run: verdict counts plus token and duration totals. **Show child properties** `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `total_duration_sec` string (uint64) optional Example: `12345` Total wall-clock duration across the run, in seconds. `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the scenario set for this run. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set being executed (must exist at run create). `status` string (enum) optional Example: `SIMULATION_RUN_STATUS_UNSPECIFIED` Lifecycle status of a simulation run. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `total_episodes` integer (int64) optional Example: `123` Total number of episodes (sum of exploration budgets). `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_name` string optional Example: `example name` Display name of the user simulator model (from the model catalog). `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the user simulator. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the workflow executing this run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "scenario_results": [ { "episodes_finished": 123, "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "total_episodes": 123 } ], "simulation_run": { "agent_config": { "agent_deployment_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" }, "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "deleted_at": "2023-01-01T00:00:00Z", "episodes_finished": 123, "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "exploration_budget": 123, "failure_reason": "example string", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "result_summary": { "total_duration_sec": "12345" }, "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_RUN_STATUS_UNSPECIFIED", "total_episodes": 123, "updated_at": "2023-01-01T00:00:00Z", "user_simulator_model_name": "example name", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Simulation Run `/v2/gen-ai/simulation_runs/{run_uuid}` To update a simulation run's display name, send a PUT request to `/v2/gen-ai/simulation_runs/{run_uuid}`. Only the name is mutable; run configuration and results are immutable. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the simulation run to update. Returned by `CreateSimulationRun` and listed via `ListSimulationRuns`. #### Request Body: `application/json` `name` string optional Example: `example name` The new name of the run. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run to update. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}` ### Payload Content type `application/json` ```json { "name": "example name", "run_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012" \ -d '{ "name": "My new simulation name" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `simulation_run` object optional One execution of a scenario set against a candidate agent. **Show child properties** `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `created_by_user_email` string optional Example: `example@example.com` Email of the user who triggered this run. `created_by_user_id` string (uint64) optional Example: `12345` User id of the actor who triggered this run. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the run has been deleted. `episodes_finished` integer (int64) optional Example: `123` Number of episodes that have finished (successfully or not). `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run reserved for this simulation, when the create request included evaluation_config. Empty when no evaluation is attached. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_model_name` string optional Example: `example name` Display name of the judge model (from the model catalog). `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the judge. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `result_summary` object optional Aggregated final result of a simulation run: verdict counts plus token and duration totals. **Show child properties** `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `total_duration_sec` string (uint64) optional Example: `12345` Total wall-clock duration across the run, in seconds. `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the scenario set for this run. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set being executed (must exist at run create). `status` string (enum) optional Example: `SIMULATION_RUN_STATUS_UNSPECIFIED` Lifecycle status of a simulation run. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `total_episodes` integer (int64) optional Example: `123` Total number of episodes (sum of exploration budgets). `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_name` string optional Example: `example name` Display name of the user simulator model (from the model catalog). `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the user simulator. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the workflow executing this run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "simulation_run": { "agent_config": { "agent_deployment_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" }, "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "deleted_at": "2023-01-01T00:00:00Z", "episodes_finished": 123, "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "exploration_budget": 123, "failure_reason": "example string", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "result_summary": { "total_duration_sec": "12345" }, "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_RUN_STATUS_UNSPECIFIED", "total_episodes": 123, "updated_at": "2023-01-01T00:00:00Z", "user_simulator_model_name": "example name", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Simulation Run `/v2/gen-ai/simulation_runs/{run_uuid}` To delete a simulation run, send a DELETE request to `/v2/gen-ai/simulation_runs/{run_uuid}`. The run must be in a terminal status (`SIMULATION_RUN_STATUS_SUCCEEDED`, `SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL`, `SIMULATION_RUN_STATUS_FAILED`, or `SIMULATION_RUN_STATUS_CANCELLED`). For runs still in progress, cancel the run first, then retry the delete. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the simulation run to delete. The run must be in a terminal status. For runs still in progress, cancel the run first, then retry the delete. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the deleted run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "run_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Cancel Simulation Run `/v2/gen-ai/simulation_runs/{run_uuid}/cancel` To cancel an in-progress simulation run, send a PATCH request to `/v2/gen-ai/simulation_runs/{run_uuid}/cancel`. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the simulation run to cancel. Returned by `CreateSimulationRun` and listed via `ListSimulationRuns`. The run must be in a non-terminal status; already-terminal runs return an error. #### Request Body: `application/json` `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run to cancel. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}/cancel` ### Payload Content type `application/json` ```json { "run_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012/cancel" \ -d '{ "run_uuid": "12345678-1234-1234-1234-123456789012" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `simulation_run` object optional One execution of a scenario set against a candidate agent. **Show child properties** `agent_config` object optional Configuration of the candidate agent under test for a simulation run. **Show child properties** `agent_deployment_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional agent deployment to run. Defaults to the agent's current deployment when unset. `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the agent to exercise as the candidate. `name` string optional Example: `example name` Display name of the candidate agent. Persisted with the run. `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `created_by_user_email` string optional Example: `example@example.com` Email of the user who triggered this run. `created_by_user_id` string (uint64) optional Example: `12345` User id of the actor who triggered this run. `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time deleted at. Unset unless the run has been deleted. `episodes_finished` integer (int64) optional Example: `123` Number of episodes that have finished (successfully or not). `evaluation_run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the evaluation run reserved for this simulation, when the create request included evaluation_config. Empty when no evaluation is attached. `exploration_budget` integer (int64) optional Example: `123` Optional run-level episodes-per-scenario override. When set, overrides each scenario's exploration_budget. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_model_name` string optional Example: `example name` Display name of the judge model (from the model catalog). `judge_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the judge. `max_turns` integer (int64) optional Example: `123` Optional run-level turn budget. When set, overrides each scenario's max_turns. `name` string optional Example: `example name` Optional run name. `result_summary` object optional Aggregated final result of a simulation run: verdict counts plus token and duration totals. **Show child properties** `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `total_duration_sec` string (uint64) optional Example: `12345` Total wall-clock duration across the run, in seconds. `verdict_counts` object optional Breakdown of episode outcomes by judge verdict. Reused wherever a success / failure / inconclusive tally is reported (run row, result summary, per-scenario rollup). **Show child properties** `failure_count` integer (int64) optional Example: `123` Number of episodes with a FAILURE verdict. `inconclusive_count` integer (int64) optional Example: `123` Number of episodes with an INCONCLUSIVE verdict. `success_count` integer (int64) optional Example: `123` Number of episodes with a SUCCESS verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run. `scenario_count` integer (int64) optional Example: `123` Number of scenarios in the scenario set for this run. `scenario_set_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario set being executed (must exist at run create). `status` string (enum) optional Example: `SIMULATION_RUN_STATUS_UNSPECIFIED` Lifecycle status of a simulation run. - SIMULATION_RUN_STATUS_PENDING: Accepted and queued, not yet executing. - SIMULATION_RUN_STATUS_RUNNING: Episodes are executing. - SIMULATION_RUN_STATUS_SUCCEEDED: All episodes finished successfully. - SIMULATION_RUN_STATUS_FAILED: The run failed, for example because of a timeout or workflow error. - SIMULATION_RUN_STATUS_CANCELLED: The run was cancelled. - SIMULATION_RUN_STATUS_EVALUATING: Episodes finished and an attached evaluation is running. Only reachable when the create request included evaluation_config. When the evaluation reaches a terminal status, its outcome is reflected in the simulation run status. - SIMULATION_RUN_STATUS_PARTIALLY_SUCCESSFUL: The simulation or its attached evaluation completed with a mixture of successful and failed results. `total_episodes` integer (int64) optional Example: `123` Total number of episodes (sum of exploration budgets). `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `user_simulator_config` object optional Optional user simulator model settings such as temperature and max_tokens. `user_simulator_model_name` string optional Example: `example name` Display name of the user simulator model (from the model catalog). `user_simulator_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Model used by the user simulator. `workflow_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the workflow executing this run. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "simulation_run": { "agent_config": { "agent_deployment_uuid": "123e4567-e89b-12d3-a456-426614174000", "agent_uuid": "123e4567-e89b-12d3-a456-426614174000", "name": "example name" }, "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "deleted_at": "2023-01-01T00:00:00Z", "episodes_finished": 123, "evaluation_run_uuid": "123e4567-e89b-12d3-a456-426614174000", "exploration_budget": 123, "failure_reason": "example string", "judge_model_name": "example name", "judge_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "max_turns": 123, "name": "example name", "result_summary": { "total_duration_sec": "12345" }, "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_count": 123, "scenario_set_uuid": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_RUN_STATUS_UNSPECIFIED", "total_episodes": 123, "updated_at": "2023-01-01T00:00:00Z", "user_simulator_model_name": "example name", "user_simulator_model_uuid": "123e4567-e89b-12d3-a456-426614174000", "workflow_uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Simulation Episodes `/v2/gen-ai/simulation_runs/{run_uuid}/episodes` To list the episodes within a simulation run, send a GET request to `/v2/gen-ai/simulation_runs/{run_uuid}/episodes`. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the run whose episodes to list. #### Query Parameters `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Optional filter by scenario. `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. `statuses` array of string, one of: SIMULATION_EPISODE_STATUS_UNSPECIFIED, SIMULATION_EPISODE_STATUS_RUNNING, SIMULATION_EPISODE_STATUS_FINISHED, SIMULATION_EPISODE_STATUS_FAILED, SIMULATION_EPISODE_STATUS_PREPARING optional Example: `["SIMULATION_EPISODE_STATUS_FINISHED"]` Filter by one or more statuses. Empty means no status filter. - SIMULATION_EPISODE_STATUS_RUNNING: The episode is executing and a trajectory is available to retrieve. - SIMULATION_EPISODE_STATUS_FINISHED: The episode reached a stop condition and produced a verdict. - SIMULATION_EPISODE_STATUS_FAILED: The episode failed because of a cancel, timeout, or error. - SIMULATION_EPISODE_STATUS_PREPARING: The episode is allocated but its trajectory is not available yet. `verdicts` array of string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Example: `["SIMULATION_EPISODE_VERDICT_SUCCESS"]` Filter by one or more verdicts. Empty means no verdict filter. - SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria. - SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria. - SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing). `search` string optional Example: `example string` Free-text search across scenario_uuid and session_id (case-insensitive substring match). Empty means no search. `sort_by` string, one of: SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED, SIMULATION_EPISODE_SORT_FIELD_SCENARIO, SIMULATION_EPISODE_SORT_FIELD_CREATED_AT, SIMULATION_EPISODE_SORT_FIELD_STATUS, SIMULATION_EPISODE_SORT_FIELD_VERDICT optional Example: `SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED` Field to sort by. Defaults to scenario ordering when unspecified. - SIMULATION_EPISODE_SORT_FIELD_SCENARIO: Sort by scenario_uuid then episode_index. Default. - SIMULATION_EPISODE_SORT_FIELD_CREATED_AT: Sort by creation date. - SIMULATION_EPISODE_SORT_FIELD_STATUS: Sort by episode status using lifecycle order. - SIMULATION_EPISODE_SORT_FIELD_VERDICT: Sort by verdict (nulls last). Default: `SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED` `sort_direction` string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Example: `SORT_DIRECTION_UNSPECIFIED` Sort direction. Defaults to ascending when unspecified. Default: `SORT_DIRECTION_UNSPECIFIED` ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}/episodes` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012/episodes" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `available_sort_by` array of string, one of: SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED, SIMULATION_EPISODE_SORT_FIELD_SCENARIO, SIMULATION_EPISODE_SORT_FIELD_CREATED_AT, SIMULATION_EPISODE_SORT_FIELD_STATUS, SIMULATION_EPISODE_SORT_FIELD_VERDICT optional Sort-by values available for this list request. `available_sort_directions` array of string, one of: SORT_DIRECTION_UNSPECIFIED, SORT_DIRECTION_ASC, SORT_DIRECTION_DESC optional Sort-direction values available for this list request. `available_statuses` array of string, one of: SIMULATION_EPISODE_STATUS_UNSPECIFIED, SIMULATION_EPISODE_STATUS_RUNNING, SIMULATION_EPISODE_STATUS_FINISHED, SIMULATION_EPISODE_STATUS_FAILED, SIMULATION_EPISODE_STATUS_PREPARING optional Statuses available for filtering this list request. `available_verdicts` array of string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Verdicts available for filtering this list request. `episodes` array of object optional The episodes for the current page. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `duration_sec` string (uint64) optional Example: `12345` Wall-clock time taken for the episode to complete, in seconds. `episode_index` integer (int64) optional Example: `123` Zero-based index of this episode within its scenario's exploration budget. `episode_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the episode. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_reasoning` string optional Example: `example string` Optional judge reasoning for the verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run this episode belongs to. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario this episode executed. `session_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Session identifier for this episode. `status` string, one of: SIMULATION_EPISODE_STATUS_UNSPECIFIED, SIMULATION_EPISODE_STATUS_RUNNING, SIMULATION_EPISODE_STATUS_FINISHED, SIMULATION_EPISODE_STATUS_FAILED, SIMULATION_EPISODE_STATUS_PREPARING optional Example: `SIMULATION_EPISODE_STATUS_UNSPECIFIED` Lifecycle status of a single episode. - SIMULATION_EPISODE_STATUS_RUNNING: The episode is executing and a trajectory is available to retrieve. - SIMULATION_EPISODE_STATUS_FINISHED: The episode reached a stop condition and produced a verdict. - SIMULATION_EPISODE_STATUS_FAILED: The episode failed because of a cancel, timeout, or error. - SIMULATION_EPISODE_STATUS_PREPARING: The episode is allocated but its trajectory is not available yet. `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `trajectory_bucket_name` string optional Example: `example name` Object storage bucket holding the trajectory JSON. Set when the episode finishes. `trajectory_bucket_region` string optional Example: `example string` Object storage bucket region for the trajectory JSON. Set when the episode finishes. `trajectory_spaces_key` string optional Example: `example string` Object storage key for the trajectory JSON. Set when the episode finishes. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `verdict` string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Example: `SIMULATION_EPISODE_VERDICT_UNSPECIFIED` The judge's verdict for an episode. - SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria. - SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria. - SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing). `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "available_sort_by": [ "SIMULATION_EPISODE_SORT_FIELD_UNSPECIFIED" ], "available_sort_directions": [ "SORT_DIRECTION_UNSPECIFIED" ], "available_statuses": [ "SIMULATION_EPISODE_STATUS_UNSPECIFIED" ], "available_verdicts": [ "SIMULATION_EPISODE_VERDICT_UNSPECIFIED" ], "episodes": [ { "created_at": "2023-01-01T00:00:00Z", "duration_sec": "12345", "episode_index": 123, "episode_uuid": "123e4567-e89b-12d3-a456-426614174000", "failure_reason": "example string", "judge_reasoning": "example string", "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "session_id": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_EPISODE_STATUS_UNSPECIFIED", "trajectory_bucket_name": "example name", "trajectory_bucket_region": "example string", "trajectory_spaces_key": "example string", "updated_at": "2023-01-01T00:00:00Z", "verdict": "SIMULATION_EPISODE_VERDICT_UNSPECIFIED" } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Simulation Episode `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}` To retrieve a single episode, send a GET request to `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}`. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the run the episode belongs to. `episode_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the episode. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012/episodes/abcdef01-2345-6789-abcd-ef0123456789" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `episode` object optional One independent execution within a simulation run, including its trajectory and verdict. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `duration_sec` string (uint64) optional Example: `12345` Wall-clock time taken for the episode to complete, in seconds. `episode_index` integer (int64) optional Example: `123` Zero-based index of this episode within its scenario's exploration budget. `episode_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the episode. `failure_reason` string optional Example: `example string` Human-readable explanation of a terminal FAILED status. Empty otherwise. `judge_reasoning` string optional Example: `example string` Optional judge reasoning for the verdict. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the run this episode belongs to. `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the scenario this episode executed. `session_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Session identifier for this episode. `status` string, one of: SIMULATION_EPISODE_STATUS_UNSPECIFIED, SIMULATION_EPISODE_STATUS_RUNNING, SIMULATION_EPISODE_STATUS_FINISHED, SIMULATION_EPISODE_STATUS_FAILED, SIMULATION_EPISODE_STATUS_PREPARING optional Example: `SIMULATION_EPISODE_STATUS_UNSPECIFIED` Lifecycle status of a single episode. - SIMULATION_EPISODE_STATUS_RUNNING: The episode is executing and a trajectory is available to retrieve. - SIMULATION_EPISODE_STATUS_FINISHED: The episode reached a stop condition and produced a verdict. - SIMULATION_EPISODE_STATUS_FAILED: The episode failed because of a cancel, timeout, or error. - SIMULATION_EPISODE_STATUS_PREPARING: The episode is allocated but its trajectory is not available yet. `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `trajectory_bucket_name` string optional Example: `example name` Object storage bucket holding the trajectory JSON. Set when the episode finishes. `trajectory_bucket_region` string optional Example: `example string` Object storage bucket region for the trajectory JSON. Set when the episode finishes. `trajectory_spaces_key` string optional Example: `example string` Object storage key for the trajectory JSON. Set when the episode finishes. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time last updated at. `verdict` string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Example: `SIMULATION_EPISODE_VERDICT_UNSPECIFIED` The judge's verdict for an episode. - SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria. - SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria. - SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "episode": { "created_at": "2023-01-01T00:00:00Z", "duration_sec": "12345", "episode_index": 123, "episode_uuid": "123e4567-e89b-12d3-a456-426614174000", "failure_reason": "example string", "judge_reasoning": "example string", "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "session_id": "123e4567-e89b-12d3-a456-426614174000", "status": "SIMULATION_EPISODE_STATUS_UNSPECIFIED", "token_usage": { "candidate_agent_tokens": "12345", "generator_tokens": "12345", "judge_tokens": "12345", "simulator_tokens": "12345", "total_tokens": "12345" }, "trajectory_bucket_name": "example name", "trajectory_bucket_region": "example string", "trajectory_spaces_key": "example string", "updated_at": "2023-01-01T00:00:00Z", "verdict": "SIMULATION_EPISODE_VERDICT_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Episode Trajectory `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory` To retrieve an episode's live trajectory, send a GET request to `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory`. Poll while the episode is running to watch turn-by-turn progress. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the run the episode belongs to. `episode_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the episode. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012/episodes/abcdef01-2345-6789-abcd-ef0123456789/trajectory" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `trajectory` object optional Turn-by-turn trajectory for one episode. Poll this resource while the episode is running to watch live progress. **Show child properties** `agent_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier of the candidate agent under test for this episode. `completed_at` string optional Example: `example string` `duration_sec` string (uint64) optional Example: `12345` `episode_index` integer (int64) optional Example: `123` `episode_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `evaluation_metrics` array of object optional Per-metric scores and judge reasoning for this trajectory. Empty when the simulation run has no associated evaluation. **Show child properties** `error_description` string optional Example: `example string` Error description if the metric could not be calculated. `metric_name` string optional Example: `example name` Metric name `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Metric UUID (built-in or custom); stable key for results UI and aggregation. `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `number_value` number (double) optional Example: `123` The value of the metric as a number. `passed` boolean optional Example: `true` Whether the score met the metric's success threshold. Set for model evaluation results only, and only when status is COMPLETED; omitted for skipped or failed metrics. `reasoning` string optional Example: `example string` Reasoning of the metric result. `status` string, one of: EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED, EVALUATION_METRIC_RESULT_STATUS_COMPLETED, EVALUATION_METRIC_RESULT_STATUS_FAILED, EVALUATION_METRIC_RESULT_STATUS_SKIPPED optional Example: `EVALUATION_METRIC_RESULT_STATUS_UNSPECIFIED` Outcome of scoring a single metric for one prompt or span. `string_value` string optional Example: `example string` The value of the metric as a string. `failure_reason` string optional Example: `example string` `judge` object optional Judge output embedded in the trajectory JSON. **Show child properties** `criteria_pass_fail` array of object optional **Show child properties** `criterion` string optional Example: `example string` `passed` boolean optional Example: `true` `reasoning` string optional Example: `example string` `reasoning` string optional Example: `example string` `verdict` string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Example: `SIMULATION_EPISODE_VERDICT_UNSPECIFIED` The judge's verdict for an episode. - SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria. - SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria. - SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing). `max_turns` integer (int64) optional Example: `123` Turn budget configured for this episode (per-scenario max_turns, after any run-level override). Compare with turn_count to see how many of the budgeted turns actually ran. `messages` array of object optional **Show child properties** `completed_at` string optional Example: `example string` ISO-8601 timestamp when the message completed. `content` string optional Example: `example string` Message body text. `role` string optional Example: `example string` Message role: "user" or "assistant". `started_at` string optional Example: `example string` ISO-8601 timestamp when the message started. `tokens` object optional Token usage for a single assistant message in the trajectory JSON. **Show child properties** `input` integer (int64) optional Example: `123` `output` integer (int64) optional Example: `123` `tool_calls` array of object optional Tool calls on assistant turns. **Show child properties** `description` string optional Example: `example string` `input_parameters` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `ok` boolean optional Example: `true` `output` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool_call_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `turn_index` integer (int64) optional Example: `123` Zero-based turn index shared by the user and assistant messages in one exchange. `run_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `scenario_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `session_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `started_at` string optional Example: `example string` `status` string, one of: SIMULATION_TRAJECTORY_STATUS_UNSPECIFIED, SIMULATION_TRAJECTORY_STATUS_RUNNING, SIMULATION_TRAJECTORY_STATUS_COMPLETED, SIMULATION_TRAJECTORY_STATUS_FAILED, SIMULATION_TRAJECTORY_STATUS_CANCELLED optional Example: `SIMULATION_TRAJECTORY_STATUS_UNSPECIFIED` Lifecycle status of the trajectory. Distinct from episode status: the trajectory is updated on every turn while the episode is executing. - SIMULATION_TRAJECTORY_STATUS_RUNNING: The episode loop is in progress; messages may grow on each poll. - SIMULATION_TRAJECTORY_STATUS_COMPLETED: The episode reached a stop condition and the trajectory is complete. - SIMULATION_TRAJECTORY_STATUS_FAILED: The episode failed before or during execution. - SIMULATION_TRAJECTORY_STATUS_CANCELLED: The episode was cancelled. `token_usage` object optional Per-actor token accounting for a run or episode. **Show child properties** `candidate_agent_tokens` string (uint64) optional Example: `12345` Tokens consumed by the candidate agent. `generator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the scenario generator. `judge_tokens` string (uint64) optional Example: `12345` Tokens consumed by the judge. `simulator_tokens` string (uint64) optional Example: `12345` Tokens consumed by the user simulator. `total_tokens` string (uint64) optional Example: `12345` Total tokens across all actors. `turn_count` integer (int64) optional Example: `123` `verdict` string, one of: SIMULATION_EPISODE_VERDICT_UNSPECIFIED, SIMULATION_EPISODE_VERDICT_SUCCESS, SIMULATION_EPISODE_VERDICT_FAILURE, SIMULATION_EPISODE_VERDICT_INCONCLUSIVE optional Example: `SIMULATION_EPISODE_VERDICT_UNSPECIFIED` The judge's verdict for an episode. - SIMULATION_EPISODE_VERDICT_SUCCESS: The candidate agent satisfied the scenario's stopping criteria. - SIMULATION_EPISODE_VERDICT_FAILURE: The candidate agent did not satisfy the stopping criteria. - SIMULATION_EPISODE_VERDICT_INCONCLUSIVE: No conclusive verdict (e.g. max_turns reached without the judge finishing). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "trajectory": { "agent_id": "123e4567-e89b-12d3-a456-426614174000", "completed_at": "example string", "duration_sec": "12345", "episode_index": 123, "episode_uuid": "123e4567-e89b-12d3-a456-426614174000", "evaluation_metrics": [], "failure_reason": "example string", "judge": { "criteria_pass_fail": [], "reasoning": "example string", "verdict": "SIMULATION_EPISODE_VERDICT_UNSPECIFIED" }, "max_turns": 123, "messages": [], "run_uuid": "123e4567-e89b-12d3-a456-426614174000", "scenario_uuid": "123e4567-e89b-12d3-a456-426614174000", "session_id": "123e4567-e89b-12d3-a456-426614174000", "started_at": "example string", "status": "SIMULATION_TRAJECTORY_STATUS_UNSPECIFIED", "token_usage": { "candidate_agent_tokens": "12345", "generator_tokens": "12345", "judge_tokens": "12345", "simulator_tokens": "12345", "total_tokens": "12345" }, "turn_count": 123, "verdict": "SIMULATION_EPISODE_VERDICT_UNSPECIFIED" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Episode Trajectory Download URL `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory_url` To retrieve a presigned download URL for an episode's trajectory, send a GET request to `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory_url`. #### Path Parameters `run_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the run the episode belongs to. `episode_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` UUID of the episode. ##### Request: `/v2/gen-ai/simulation_runs/{run_uuid}/episodes/{episode_uuid}/trajectory_url` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/simulation_runs/12345678-1234-1234-1234-123456789012/episodes/abcdef01-2345-6789-abcd-ef0123456789/trajectory_url" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `download_url` string optional Example: `example string` The presigned URL to download the trajectory JSON file. `expires_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The time the URL expires at. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "download_url": "example string", "expires_at": "2023-01-01T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Workspaces `/v2/gen-ai/workspaces` To list all workspaces, send a GET request to `/v2/gen-ai/workspaces`. ##### Request: `/v2/gen-ai/workspaces` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspaces` array of object optional Workspaces **Show child properties** `agents` array of object optional Agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `output_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspaces": [ { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Workspace `/v2/gen-ai/workspaces` To create a new workspace, send a POST request to `/v2/gen-ai/workspaces`. The response body contains a JSON object with the newly created workspace object. #### Request Body: `application/json` `agent_uuids` array of string optional Example: `["example string"]` Ids of the agents(s) to attach to the workspace `description` string optional Example: `example string` Description of the workspace `name` string optional Example: `example name` Name of the workspace ##### Request: `/v2/gen-ai/workspaces` ### Payload Content type `application/json` ```json { "agent_uuids": [ "example string" ], "description": "example string", "name": "example name" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces" \ -d '{ "name": "api-create", "description": "This is a test workspace created via the API", "agent_uuids": [ "9758a232-b351-11ef-bf8f-4e013e2ddde4" ] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional **Show child properties** `agents` array of object optional Agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `output_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Workspace `/v2/gen-ai/workspaces/{workspace_uuid}` To retrieve details of a workspace, GET request to `/v2/gen-ai/workspaces/{workspace_uuid}`. The response body is a JSON object containing the workspace. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace UUID. ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/c441bf77-81d6-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional **Show child properties** `agents` array of object optional Agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `output_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Workspace `/v2/gen-ai/workspaces/{workspace_uuid}` To update a workspace, send a PUT request to `/v2/gen-ai/workspaces/{workspace_uuid}`. The response body is a JSON object containing the workspace. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace UUID. #### Request Body: `application/json` `description` string optional Example: `example string` The new description of the workspace `name` string optional Example: `example name` The new name of the workspace `workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Workspace UUID. ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}` ### Payload Content type `application/json` ```json { "description": "example string", "name": "example name", "workspace_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/1b418231-b7d6-11ef-bf8f-4e013e2ddde4" \ -d '{ "workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "name": "rename-agent-api", "description": "workspace description" }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional **Show child properties** `agents` array of object optional Agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `output_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Workspace `/v2/gen-ai/workspaces/{workspace_uuid}` To delete a workspace, send a DELETE request to `/v2/gen-ai/workspace/{workspace_uuid}`. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace UUID. ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/5581a586-a745-11ef-bf8f-4e013e2ddde4" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Workspace **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List agents by Workspace `/v2/gen-ai/workspaces/{workspace_uuid}/agents` To list all agents by a Workspace, send a GET request to `/v2/gen-ai/workspaces/{workspace_uuid}/agents`. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace UUID. #### Query Parameters `only_deployed` boolean optional Example: `true` Only list agents that are deployed. `page` integer optional Example: `1` Page number. `per_page` integer optional Example: `1` Items per page. ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}/agents` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/agents" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agents` array of object optional **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional `name` string optional Example: `example name` Name `output_schema` object optional `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description **Show child properties** `completed_datasources` integer (int64) optional Example: `123` Number of datasources indexed completed `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `data_source_jobs` array of object optional Details on Data Sources included in the Indexing Job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `data_source_uuids` array of string optional Example: `["example string"]` `finished_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `is_report_available` boolean optional Example: `true` Boolean value to determine if the indexing job details are available `knowledge_base_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Knowledge base id `phase` string (enum) optional Example: `BATCH_JOB_PHASE_UNKNOWN` `started_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `status` string (enum) optional Example: `INDEX_JOB_STATUS_UNKNOWN` `tokens` integer (int64) optional Example: `123` Number of tokens \[This field is deprecated] `total_datasources` integer (int64) optional Example: `123` Number of datasources being indexed `total_tokens` string (uint64) optional Example: `12345` Total Tokens Consumed By the Indexing Job `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. **Show child properties** `enabled` boolean optional Example: `true` Whether reranking is enabled for retrieval `model` string optional Example: `"bge-reranker-v2-m3"` Reranker model internal name `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description **Show child properties** `description` string optional Example: `example string` `name` string optional Example: `example name` `url` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities **Show child properties** `capabilities` array of string optional Example: `["example string"]` Capabilities supported by this endpoint (e.g. input_text, output_text, input_image) `endpoint` string optional Example: `/chat/responses` The endpoint path (e.g. /chat/responses) `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data `modalities` object optional Input/output modalities **Show child properties** `input` array of string optional Example: `["example string"]` `output` array of string optional Example: `["example string"]` `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata **Show child properties** `default_string` string optional Example: `example string` String default value (for type="dropdown", e.g. "medium") `default_value` number (double) optional Example: `0.7` Numeric default value (for type="number") `max` number (double) optional Example: `1` Maximum allowed value (for type="number") `min` number (double) optional Example: `0` Minimum allowed value (for type="number") `name` string optional Example: `temperature` Setting key name (e.g. "max_tokens", "temperature", "resolution") `options` array of string optional Example: `["example string"]` Allowed values for dropdown selections (for type="dropdown") `step` number (double) optional Example: `123` Step increment for numeric settings (for type="number") `type` string optional Example: `number` Setting value type: "number" or "dropdown" `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model **Show child properties** `major` integer (int64) optional Example: `123` Major version number `minor` integer (int64) optional Example: `123` Minor version number `patch` integer (int64) optional Example: `123` Patch version number `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional **Show child properties** `fallback_models` array of string optional Example: `["example string"]` Router-level fallback models `policies` array of object optional Task routing policies *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template **Show child properties** `priority` integer (int32) optional Example: `123` Priority of the guardrail `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid of the guardrail `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional **Show child properties** `agents` array of object optional Agents `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `star_metric` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `links` object optional Links to other pages **Show child properties** `pages` object optional Information about how to reach other pages **Show child properties** `first` string optional Example: `example string` First page `last` string optional Example: `example string` Last page `next` string optional Example: `example string` Next page `previous` string optional Example: `example string` Previous page `meta` object optional Meta information about the data set **Show child properties** `page` integer (int64) optional Example: `123` The current page `pages` integer (int64) optional Example: `123` Total number of pages `total` integer (int64) optional Example: `123` Total amount of items over all pages **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agents": [ { "api_key_infos": [], "api_keys": [], "chatbot_identifiers": [], "child_agents": [], "conversation_logs_enabled": true, "created_at": "2023-01-01T00:00:00Z", "description": "example string", "functions": [], "guardrails": [], "if_case": "example string", "instruction": "example string", "k": 123, "knowledge_bases": [], "max_tokens": 123, "mcp_servers": [], "name": "example name", "parent_agents": [], "project_id": "123e4567-e89b-12d3-a456-426614174000", "provide_citations": true, "reasoning_effort": "example string", "region": "example string", "retrieval_method": "RETRIEVAL_METHOD_UNKNOWN", "route_created_at": "2023-01-01T00:00:00Z", "route_created_by": "12345", "route_name": "example name", "route_uuid": "123e4567-e89b-12d3-a456-426614174000", "tags": [ "example string" ], "temperature": 123, "thinking_token_budget": 123, "top_p": 123, "updated_at": "2023-01-01T00:00:00Z", "url": "example string", "user_id": "12345", "uuid": "123e4567-e89b-12d3-a456-426614174000", "version_hash": "example string", "vpc_egress_ips": [ "example string" ], "vpc_uuid": "\"12345678-1234-1234-1234-123456789012\"", "web_fetch_enabled": true, "web_search_enabled": true } ], "links": { "pages": { "first": "example string", "last": "example string", "next": "example string", "previous": "example string" } }, "meta": { "page": 123, "pages": 123, "total": 123 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Move Agents to a Workspace `/v2/gen-ai/workspaces/{workspace_uuid}/agents` To move all listed agents a given workspace, send a PUT request to `/v2/gen-ai/workspaces/{workspace_uuid}/agents`. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace uuid to move agents to #### Request Body: `application/json` `agent_uuids` array of string optional Example: `["example string"]` Agent uuids `workspace_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Workspace uuid to move agents to ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}/agents` ### Payload Content type `application/json` ```json { "agent_uuids": [ "example string" ], "workspace_uuid": "123e4567-e89b-12d3-a456-426614174000" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/1b418231-b7d6-11ef-bf8f-4e013e2ddde4/agents" \ -d '{ "workspace_uuid": "1b418231-b7d6-11ef-bf8f-4e013e2ddde4", "agent_uuids": ["95ea6652-75ed-11ef-bf8f-4e013e2ddde4", "37455431-84bd-4fa2-94cf-e8486f8f8c5e"] }' ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional **Show child properties** `agents` array of object optional Agents **Show child properties** `anthropic_api_key` object optional Anthropic API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_key_infos` array of object optional Api key infos **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` Created by `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `name` string optional Example: `example name` Name `secret_key` string optional Example: `example string` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `api_keys` array of object optional Api keys **Show child properties** `api_key` string optional Example: `example string` Api key `chatbot` object optional A Chatbot **Show child properties** `allowed_domains` array of string optional Example: `["example string"]` `button_background_color` string optional Example: `example string` `logo` string optional Example: `example string` `name` string optional Example: `example name` Name of chatbot `primary_color` string optional Example: `example string` `secondary_color` string optional Example: `example string` `starting_message` string optional Example: `example string` `chatbot_identifiers` array of object optional Chatbot identifiers **Show child properties** `agent_chatbot_identifier` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Agent chatbot identifier `child_agents` array of object optional Child agents `conversation_logs_enabled` boolean optional Example: `true` Whether conversation logs are enabled for the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `deployment` object optional Description of deployment **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `name` string optional Example: `example name` Name `status` string (enum) optional Example: `STATUS_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your deployed agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `visibility` string, one of: VISIBILITY_UNKNOWN, VISIBILITY_DISABLED, VISIBILITY_PLAYGROUND, VISIBILITY_PUBLIC, VISIBILITY_PRIVATE optional Example: `VISIBILITY_UNKNOWN` - VISIBILITY_UNKNOWN: The status of the deployment is unknown - VISIBILITY_DISABLED: The deployment is disabled and will no longer service requests - VISIBILITY_PLAYGROUND: Deprecated: No longer a valid state - VISIBILITY_PUBLIC: The deployment is public and will service requests from the public internet - VISIBILITY_PRIVATE: The deployment is private and will only service requests from other agents, or through API keys `description` string optional Example: `example string` Description of agent `functions` array of object optional **Show child properties** `api_key` string optional Example: `example string` Api key `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `created_by` string (uint64) optional Example: `12345` Created by user id from DO `description` string optional Example: `example string` Agent description `faas_name` string optional Example: `example name` `faas_namespace` string optional Example: `example name` `input_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `output_schema` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Download your agent here `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `guardrails` array of object optional The guardrails the agent is attached to **Show child properties** `agent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `default_response` string optional Example: `example string` `description` string optional Example: `example string` `guardrail_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_attached` boolean optional Example: `true` `is_default` boolean optional Example: `true` `metadata` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` `priority` integer (int32) optional Example: `123` `type` string, one of: GUARDRAIL_TYPE_UNKNOWN, GUARDRAIL_TYPE_JAILBREAK, GUARDRAIL_TYPE_SENSITIVE_DATA, GUARDRAIL_TYPE_CONTENT_MODERATION optional Example: `GUARDRAIL_TYPE_UNKNOWN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `if_case` string optional Example: `example string` `instruction` string optional Example: `example string` Agent instruction. Instructions help your agent to perform its job effectively. See [Write Effective Agent Instructions](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/index.html.md#agent-instructions) for best practices. `k` integer (int64) optional Example: `123` `knowledge_bases` array of object optional Knowledge bases **Show child properties** `added_to_agent_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time when the knowledge base was added to the agent `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `database_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `embedding_model_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `is_public` boolean optional Example: `true` Whether the knowledge base is public or not `last_indexing_job` object optional IndexingJob description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of knowledge base `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `region` string optional Example: `example string` Region code `reranking_config` object optional Configuration for cross-encoder reranking during retrieval. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tags` array of string optional Example: `["example string"]` Tags to organize related resources `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `user_id` string (int64) optional Example: `12345` Id of user that created the knowledge base `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id for knowledge base `logging_config` object optional **Show child properties** `galileo_project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Galileo project identifier `galileo_project_name` string optional Example: `example name` Name of the Galileo project `insights_enabled` boolean optional Example: `true` Whether insights are enabled `insights_enabled_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Timestamp when insights were enabled `log_stream_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Identifier for the log stream `log_stream_name` string optional Example: `example name` Name of the log stream `max_tokens` integer (int64) optional Example: `123` `mcp_servers` array of object optional MCP (Model Context Protocol) servers attached to this agent **Show child properties** `allowed_tools` array of string optional Example: `["example string"]` Optional list of allowed tool names to expose from this server `authorization` string optional Example: `example string` Optional authorization header value for the MCP server `headers` object optional Optional additional headers to send to the MCP server *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `server_label` string optional Example: `example string` A label identifying this MCP server `server_url` string optional Example: `example string` The URL of the MCP server `model` object optional Description of a Model **Show child properties** `agreement` object optional Agreement Description *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `benchmark_score` object optional Benchmark scores for this model, stored as arbitrary JSON *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `capabilities` array of string optional Example: `["example string"]` High-level capabilities (e.g. tool_calling, vision, streaming) `context_window` string (int64) optional Example: `12345` Context window size in tokens `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `endpoints` array of object optional Available endpoints and their capabilities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `inference_name` string optional Example: `example name` Internally used name `inference_version` string optional Example: `example string` Internally used version `is_foundational` boolean optional Example: `true` True if it is a foundational model provided by do `kb_default_chunk_size` integer (int64) optional Example: `123` Default chunking size limit to show in UI `kb_max_chunk_size` integer (int64) optional Example: `123` Maximum chunk size limit of model `kb_min_chunk_size` integer (int64) optional Example: `123` Minimum chunking size token limits if model supports KNOWLEDGEBASE usecase `lifecycle_status` string optional Example: `example string` Lifecycle status of the model (internal, public-preview, active, deprecated, end_of_life) `metadata` object optional Additional meta data *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `modalities` object optional Input/output modalities *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the model `parameter_count` number (float) optional Example: `123` Parameter count in billions `parent_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id of the model, this model is based on `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `reasoning_efforts` array of string optional Example: `["example string"]` Available reasoning efforts for this model `settings` array of object optional Playground settings derived from model metadata *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `thinking` boolean optional Example: `true` Whether this model supports extended thinking (Anthropic models) `type` string optional Example: `example string` Model type (chat, embedding, image, reasoning, coding) `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `upload_complete` boolean optional Example: `true` Model has been fully uploaded `url` string optional Example: `example string` Download url `usecases` array of string (enum) optional Example: `["MODEL_USECASE_AGENT","MODEL_USECASE_GUARDRAIL"]` Usecases of the model `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `version` object optional Version Information about a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_provider_key` object optional **Show child properties** `api_key_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` API key ID `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the key `provider` string, one of: MODEL_PROVIDER_DIGITALOCEAN, MODEL_PROVIDER_ANTHROPIC, MODEL_PROVIDER_OPENAI optional Example: `MODEL_PROVIDER_DIGITALOCEAN` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `model_router` object optional Model router **Show child properties** `config` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date / time `description` string optional Example: `example string` Description `name` string optional Example: `example name` Name of the model router `regions` array of string optional Example: `["example string"]` Target regions for the router `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `name` string optional Example: `example name` Agent name `openai_api_key` object optional OpenAI API Key Info **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key creation date `created_by` string (uint64) optional Example: `12345` Created by user id from DO `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key deleted date `models` array of object optional Models supported by the openAI api key *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Key last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Uuid `parent_agents` array of object optional Parent agents `project_id` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `provide_citations` boolean optional Example: `true` Whether the agent should provide in-response citations `reasoning_effort` string optional Example: `example string` The reasoning effort for the agent `region` string optional Example: `example string` Region code `retrieval_method` string, one of: RETRIEVAL_METHOD_UNKNOWN, RETRIEVAL_METHOD_REWRITE, RETRIEVAL_METHOD_STEP_BACK, RETRIEVAL_METHOD_SUB_QUERIES, RETRIEVAL_METHOD_NONE optional Example: `RETRIEVAL_METHOD_UNKNOWN` - RETRIEVAL_METHOD_UNKNOWN: The retrieval method is unknown - RETRIEVAL_METHOD_REWRITE: The retrieval method is rewrite - RETRIEVAL_METHOD_STEP_BACK: The retrieval method is step back - RETRIEVAL_METHOD_SUB_QUERIES: The retrieval method is sub queries - RETRIEVAL_METHOD_NONE: The retrieval method is none `route_created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation of route date / time `route_created_by` string (uint64) optional Example: `12345` `route_name` string optional Example: `example name` Route name `route_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `tags` array of string optional Example: `["example string"]` Agent tag to organize related resources `temperature` number (float) optional Example: `123` `template` object optional Represents an AgentTemplate entity **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's creation date `description` string optional Example: `example string` Deprecated - Use summary instead `guardrails` array of object optional List of guardrails associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `instruction` string optional Example: `example string` Instructions for the agent template `k` integer (int64) optional Example: `123` The 'k' value for the agent template `knowledge_bases` array of object optional List of knowledge bases associated with the agent template *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `long_description` string optional The long description of the agent template `max_tokens` integer (int64) optional Example: `123` The max_tokens setting for the agent template `model` object optional Description of a Model *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example name` Name of the agent template `short_description` string optional The short description of the agent template `summary` string optional Example: `example string` The summary of the agent template `tags` array of string optional Example: `["example string"]` List of tags associated with the agent template `temperature` number (float) optional Example: `123` The temperature setting for the agent template `template_type` string, one of: AGENT_TEMPLATE_TYPE_STANDARD, AGENT_TEMPLATE_TYPE_ONE_CLICK optional Example: `AGENT_TEMPLATE_TYPE_STANDARD` - AGENT_TEMPLATE_TYPE_STANDARD: The standard agent template - AGENT_TEMPLATE_TYPE_ONE_CLICK: The one click agent template `top_p` number (float) optional Example: `123` The top_p setting for the agent template `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` The agent template's last updated date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id `thinking_token_budget` integer (int64) optional Example: `123` The thinking token budget for Anthropic extended thinking (0 = disabled) `top_p` number (float) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Last modified `url` string optional Example: `example string` Access your agent under this url `user_id` string (uint64) optional Example: `12345` Id of user that created the agent `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique agent id `version_hash` string optional Example: `example string` The latest version of the agent `vpc_egress_ips` array of string optional Example: `["example string"]` VPC Egress IPs `vpc_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` `web_fetch_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_fetch tool. `web_search_enabled` boolean optional Example: `true` Whether this agent can use the built-in web_search tool. `workspace` object optional `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Creation date `created_by` string (uint64) optional Example: `12345` The id of user who created this workspace `created_by_email` string optional Example: `example@example.com` The email of the user who created this workspace `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Deleted date `description` string optional Example: `example string` Description of the workspace `evaluation_test_cases` array of object optional Evaluations **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` `name` string optional Example: `example name` Name of the workspace `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Update date `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` Unique id **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "agents": [], "created_at": "2023-01-01T00:00:00Z", "created_by": "12345", "created_by_email": "example@example.com", "deleted_at": "2023-01-01T00:00:00Z", "description": "example string", "evaluation_test_cases": [], "name": "example name", "updated_at": "2023-01-01T00:00:00Z", "uuid": "123e4567-e89b-12d3-a456-426614174000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Evaluation Test Cases by Workspace `/v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases` To list all evaluation test cases by a workspace, send a GET request to `/v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases`. #### Path Parameters `workspace_uuid` string required Example: `"123e4567-e89b-12d3-a456-426614174000"` Workspace UUID. ##### Request: `/v2/gen-ai/workspaces/{workspace_uuid}/evaluation_test_cases` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/gen-ai/workspaces/11efb7d6-cdb5-6388-bf8f-4e013e2ddde4/evaluation_test_cases" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `evaluation_test_cases` array of object optional **Show child properties** `archived_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `created_by_user_email` string optional Example: `example@example.com` `created_by_user_id` string (uint64) optional Example: `12345` `dataset` object optional **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` Time created at. `dataset_name` string optional Example: `example name` Name of the dataset. `dataset_paradigm` string, one of: EVALUATION_DATASET_PARADIGM_SINGLE_TURN, EVALUATION_DATASET_PARADIGM_MULTI_TURN, EVALUATION_DATASET_PARADIGM_CODING, EVALUATION_DATASET_PARADIGM_N_PLUS_1 optional Example: `EVALUATION_DATASET_PARADIGM_SINGLE_TURN` EvaluationDatasetParadigm is the row/content shape of a dataset, orthogonal to the surface in EvaluationDatasetType (e.g. a model dataset can be single- or multi-turn). `dataset_type` string, one of: EVALUATION_DATASET_TYPE_UNKNOWN, EVALUATION_DATASET_TYPE_MODEL optional Example: `EVALUATION_DATASET_TYPE_UNKNOWN` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` UUID of the dataset. `file_size` string (uint64) optional Example: `12345` The size of the dataset uploaded file in bytes. `has_ground_truth` boolean optional Example: `true` Does the dataset have a ground truth column? `row_count` integer (int64) optional Example: `123` Number of rows in the dataset. `dataset_name` string optional Example: `example name` `dataset_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `description` string optional Example: `example string` `latest_version_number_of_runs` integer (int32) optional Example: `123` `metrics` array of object optional **Show child properties** `associated_presets` array of object optional Saved model evaluation presets that reference this metric. Populated for custom metrics when listing metrics so the dashboard can warn that deleting the metric will also delete these presets. Empty for built-in metrics. **Show child properties** `eval_preset_uuid` string optional Example: `"12345678-1234-1234-1234-123456789012"` Unique identifier of the saved model evaluation preset that references the metric. `name` string optional Example: `"My evaluation preset"` Display name of the saved model evaluation preset. `category` string (enum) optional Example: `METRIC_CATEGORY_UNSPECIFIED` `custom_eval_config` object optional Configuration for a custom model-evaluation metric scored by an LLM judge. Prompt and model response are always included in the judge context. **Show child properties** `created_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `deleted_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` When set, the custom metric is soft-deleted and must not appear in pickers. `requires_ground_truth` boolean optional Example: `true` When true, each row must provide ground truth and it is included in the judge context. When false, ground truth is not required and is not sent to the judge. `scoring_prompt` string optional Example: `example string` Instructions for the judge model (multi-line). `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `description` string optional Example: `example string` `evaluation_scope` string, one of: EVALUATION_SCOPE_UNSPECIFIED, EVALUATION_SCOPE_AGENT, EVALUATION_SCOPE_MODEL optional Example: `EVALUATION_SCOPE_UNSPECIFIED` Scope that determines whether a metric belongs to agent evaluation or model evaluation. For backwards compatibility, UNSPECIFIED defaults to agent metrics only in list operations. `inverted` boolean optional Example: `true` If true, the metric is inverted, meaning that a lower value is better. `is_metric_goal` boolean optional Example: `true` `metric_name` string optional Example: `example name` `metric_rank` integer (int64) optional Example: `123` `metric_type` string, one of: METRIC_TYPE_UNSPECIFIED, METRIC_TYPE_GENERAL_QUALITY, METRIC_TYPE_RAG_AND_TOOL, METRIC_TYPE_MODEL_QUALITY, METRIC_TYPE_MODEL_SAFETY optional Example: `METRIC_TYPE_UNSPECIFIED` `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `metric_value_type` string, one of: METRIC_VALUE_TYPE_UNSPECIFIED, METRIC_VALUE_TYPE_NUMBER, METRIC_VALUE_TYPE_STRING, METRIC_VALUE_TYPE_PERCENTAGE optional Example: `METRIC_VALUE_TYPE_UNSPECIFIED` `range_max` number (float) optional Example: `123` The maximum value for the metric. `range_min` number (float) optional Example: `123` The minimum value for the metric. `source` string, one of: EVALUATION_METRIC_SOURCE_UNSPECIFIED, EVALUATION_METRIC_SOURCE_BUILTIN, EVALUATION_METRIC_SOURCE_CUSTOM optional Example: `EVALUATION_METRIC_SOURCE_UNSPECIFIED` Distinguishes platform catalog metrics from user-defined LLM-as-judge metrics. `turn_type` string, one of: EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED, EVALUATION_METRIC_TURN_TYPE_SINGLE_TURN, EVALUATION_METRIC_TURN_TYPE_MULTI_TURN optional Example: `EVALUATION_METRIC_TURN_TYPE_UNSPECIFIED` Whether the metric is for single-turn or multi-turn evaluations. `name` string optional Example: `example name` `star_metric` object optional **Show child properties** `metric_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `name` string optional Example: `example name` `success_threshold` number (float) optional Example: `123` The success threshold for the star metric. This is a value that the metric must reach to be considered successful. `success_threshold_pct` integer (int32) optional Example: `123` The success threshold for the star metric. This is a percentage value between 0 and 100. `test_case_uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` `total_runs` integer (int32) optional Example: `123` `updated_at` string (date-time) optional Example: `2023-01-01T00:00:00Z` `updated_by_user_email` string optional Example: `example@example.com` `updated_by_user_id` string (uint64) optional Example: `12345` `version` integer (int64) optional Example: `123` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "evaluation_test_cases": [ { "archived_at": "2023-01-01T00:00:00Z", "created_at": "2023-01-01T00:00:00Z", "created_by_user_email": "example@example.com", "created_by_user_id": "12345", "dataset_name": "example name", "dataset_uuid": "123e4567-e89b-12d3-a456-426614174000", "description": "example string", "latest_version_number_of_runs": 123, "metrics": [], "name": "example name", "test_case_uuid": "123e4567-e89b-12d3-a456-426614174000", "total_runs": 123, "updated_at": "2023-01-01T00:00:00Z", "updated_by_user_email": "example@example.com", "updated_by_user_id": "12345", "version": 123 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Inference Pricing](https://docs.digitalocean.com/products/inference/details/pricing/index.html.md), [Supported Models on DigitalOcean Inference](https://docs.digitalocean.com/products/inference/details/models/index.html.md), [Use Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/apps/ --- title: Apps description: App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows developers to publish code directly to DigitalOcean servers … product: Reference url: https://docs.digitalocean.com/reference/api/reference/apps/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Apps Generated on 4 Dec 2026 App Platform is a Platform-as-a-Service (PaaS) offering from DigitalOcean that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure. Most API operations are centered around a few core object types. Following are the definitions of these types. These definitions will be omitted from the operation-specific documentation. For documentation on app specifications (`AppSpec` objects), please refer to the [product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/index.html.md)). Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Apps](#apps_list) - **POST** [Create a New App](#apps_create) - **GET** [Retrieve an Existing App](#apps_get) - **PUT** [Update an App](#apps_update) - **DELETE** [Delete an App](#apps_delete) - **POST** [Restart an App](#apps_restart) - **GET** [Retrieve Active Deployment Logs](#apps_get_logs_active_deployment) - **GET** [Retrieve Exec URL](#apps_get_exec_active_deployment) - **GET** [Retrieve App Instances](#apps_get_instances) - **GET** [List App Deployments](#apps_list_deployments) - **POST** [Create an App Deployment](#apps_create_deployment) - **GET** [Retrieve an App Deployment](#apps_get_deployment) - **POST** [Cancel a Deployment](#apps_cancel_deployment) - **GET** [Retrieve Deployment Logs](#apps_get_logs) - **GET** [Retrieve Aggregate Deployment Logs](#apps_get_logs_aggregate) - **GET** [Retrieve Exec URL for Deployment](#apps_get_exec) - **GET** [Retrieve Active Deployment Aggregate Logs](#apps_get_logs_active_deployment_aggregate) - **GET** [List Job Invocations](#apps_list_job_invocations) - **GET** [Get Job Invocations](#apps_get_job_invocation) - **POST** [Cancel Job Invocation](#apps_cancel_job_invocation) - **GET** [Retrieve Job Invocation Logs](#apps_get_job_invocation_logs) - **GET** [List App Events](#apps_list_events) - **GET** [Get an Event](#apps_get_event) - **POST** [Cancel an Event](#apps_cancel_event) - **GET** [Retrieve Event Logs](#apps_get_event_logs) - **GET** [List Instance Sizes](#apps_list_instanceSizes) - **GET** [Retrieve an Instance Size](#apps_get_instanceSize) - **GET** [List App Regions](#apps_list_regions) - **POST** [Propose an App Spec](#apps_validate_appSpec) - **GET** [List all app alerts](#apps_list_alerts) - **POST** [Update destinations for alerts](#apps_assign_alertDestinations) - **POST** [Rollback App](#apps_create_rollback) - **POST** [Validate App Rollback](#apps_validate_rollback) - **POST** [Commit App Rollback](#apps_commit_rollback) - **POST** [Revert App Rollback](#apps_revert_rollback) - **GET** [Retrieve App Daily Bandwidth Metrics](#apps_get_metrics_bandwidth_daily) - **POST** [Retrieve Multiple Apps' Daily Bandwidth Metrics](#apps_list_metrics_bandwidth_daily) - **GET** [Retrieve App Health](#apps_get_health) ## GET List All Apps `/v2/apps` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: app:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` 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. #### Query Parameters `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `with_projects` boolean optional Example: `true` Whether the project_id of listed apps should be fetched and included. ##### Request: `/v2/apps` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list() ``` #### Responses **200** A JSON object with a apps key. This is list of object apps. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `apps` array of object optional **Show child properties** `active_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `dedicated_ips` array of object optional read-only **Show child properties** `id` string optional Example: `9e7bc2ac-205a-45d6-919c-e1ac5e73f962` `ip` string optional Example: `192.168.1.1` `status` string, one of: UNKNOWN, ASSIGNING, ASSIGNED, REMOVED optional read-only Example: `ASSIGNED` `default_ingress` string optional read-only Example: `digitalocean.com` `domains` array of object optional read-only **Show child properties** `certificate_expires_at` string (date-time) optional read-only Example: `2024-01-29T23:59:59Z` `id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional `rotate_validation_records` boolean optional read-only `spec` object optional **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `validations` array of object optional **Show child properties** `txt_name` string optional read-only Example: `_acme-challenge.app.example.com` `txt_value` string optional read-only Example: `lXLOcN6cPv0nproViNcUHcahD9TrIPlNgdwesj0pYpk` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `in_progress_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `last_deployment_created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `live_domain` string optional read-only Example: `live_domain` `live_url` string optional read-only Example: `google.com` `live_url_base` string optional read-only Example: `digitalocean.com` `owner_uuid` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `pending_deployment` object optional `pinned_deployment` object optional `project_id` string optional read-only Example: `88b72d1a-b78a-4d9f-9090-b53c4399073f` Requires `project:read` scope. `region` object optional **Show child properties** `continent` string optional read-only Example: `europe` `data_centers` array of string optional read-only Example: `["ams"]` `default` boolean optional read-only Example: `true` Whether or not the region is presented as the default. `disabled` boolean optional read-only Example: `true` `flag` string optional read-only Example: `ams` `label` string optional read-only Example: `ams` `reason` string optional read-only Example: `to crowded` `slug` string optional read-only Example: `basic` `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional read-only Example: `2020-12-01T00:42:16Z` `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "apps": [ { "active_deployment": { "created_at": "2020-12-01T00:40:05Z", "id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "phase_last_updated_at": "2020-12-01T00:42:12Z", "services": [ { "name": "sample-php", "source_commit_hash": "54d4a727f457231062439895000d45437c7bb405" } ], "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "region": "fra", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "updated_at": "2020-12-01T00:42:12Z" }, "cause": "app spec updated", "created_at": "2020-11-19T20:27:18Z", "dedicated_ips": [ { "id": "c24d8f48-3bc4-49f5-8ca0-58e8164427ac", "ip": "192.168.1.1", "status": "ASSIGNED" }, { "id": "4768fb15-2837-4dda-9be5-3951df4bc3d0", "ip": "192.168.1.2", "status": "ASSIGNED" } ], "default_ingress": "https://sample-php-iaj87.ondigitalocean.app", "domains": [ { "certificate_expires_at": "2024-01-29T23:59:59Z", "id": "0831f444-a1a7-11ed-828c-ef59494480b5", "phase": "ACTIVE", "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" } ] }, "rotate_validation_records": false, "spec": { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } } ], "id": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "last_deployment_created_at": "2020-12-01T00:40:05Z", "live_domain": "sample-php.example.com", "live_url": "https://sample-php.example.com", "live_url_base": "https://sample-php.example.com", "owner_uuid": "ff36cbc6fd350fe12577f5123133bb5ba01a2419", "pending_deployment": { "created_at": "2020-12-01T00:40:05Z", "id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "phase_last_updated_at": "2020-12-01T00:42:12Z", "services": [ { "name": "sample-php", "source_commit_hash": "54d4a727f457231062439895000d45437c7bb405" } ], "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "region": "fra", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "updated_at": "2020-12-01T00:42:12Z" }, "progress": { "phase": "ACTIVE", "steps": [ { "ended_at": "2020-12-01T00:41:26.653989756Z", "name": "build", "started_at": "2020-12-01T00:40:11.979257919Z", "status": "SUCCESS", "steps": [ { "ended_at": "2020-12-01T00:40:12.470972033Z", "name": "initialize", "started_at": "2020-12-01T00:40:11.979305214Z", "status": "SUCCESS" }, { "ended_at": "2020-12-01T00:41:26.180360487Z", "name": "components", "started_at": "2020-12-01T00:40:12.470996857Z", "status": "SUCCESS", "steps": [ { "component_name": "sample-php", "ended_at": "0001-01-01T00:00:00Z", "message_base": "Building service", "name": "sample-php", "started_at": "0001-01-01T00:00:00Z", "status": "SUCCESS" } ] } ] } ], "success_steps": 6, "tier_slug": "basic", "total_steps": 6 }, "region": { "continent": "Europe", "data_centers": [ "fra1" ], "flag": "germany", "label": "Frankfurt", "slug": "fra" }, "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2020-12-01T00:42:16Z", "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } ], "links": { "pages": {} }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New App `/v2/apps` Create a new app by submitting an app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/index.html.md). #### Header Parameters `Accept` string, one of: application/json, application/yaml optional Example: `application/json` The content-type that should be used by the response. By default, the response will be `application/json`. `application/yaml` is also supported. `Content-Type` string, one of: application/json, application/yaml optional Example: `application/json` The content-type used for the request. By default, the requests are assumed to use `application/json`. `application/yaml` is also supported. #### Request Body: `application/json` `project_id` string optional The ID of the project the app should be assigned to. If omitted, it will be assigned to your default project. Requires `project:assign_resource` and `project:update` scopes. `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `cors` object optional `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. **Show child properties** `component` object optional The component to route to. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `match` object optional The match configuration for the rule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `redirect` object optional The redirect configuration for the rule. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `2` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `60` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port. `success_threshold` integer (int32) optional Example: `3` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `45` The number of seconds after which the check times out. `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `termination` object optional **Show child properties** `drain_seconds` integer (int32) optional Example: `15` The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15) `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. **Show child properties** `max_instance_count` integer (uint32) optional Example: `3` The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances. `metrics` object optional The metrics that the component is scaled on. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `min_instance_count` integer (uint32) optional Example: `2` The minimum amount of instances for this component. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) ##### Request: `/v2/apps` ### Payload Content type `application/json` ```json { "spec": { "disable_edge_cache": true, "disable_email_obfuscation": false, "egress": { "type": "DEDICATED_IP" }, "enhanced_threat_control_enabled": true, "name": "web-app", "region": "nyc", "services": [ { "environment_slug": "node-js", "github": { "branch": "main", "deploy_on_push": true, "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "api", "routes": [ { "path": "/api" } ], "run_command": "bin/api" } ], "vpc": { "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps" -d '{"spec":{"name":"web-app","region":"nyc", \ "services":[{"name":"api","github":{"branch":"main",\ "deploy_on_push":true,"repo":"digitalocean/sample-golang"}, \ "run_command":"bin/api","environment_slug":"node-js", \ "instance_count":2,"instance_size_slug":"apps-s-1vcpu-0.5gb", \ "routes":[{"path":"/api"}]}]}}' ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_resp = client.apps.create( { "spec": { "name": "web-app", "region": "nyc", "services": [ { "name": "api", "github": {}, "run_command": "bin/api", "environment_slug": "node-js", "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "routes": [], } ], } } ) ``` #### Responses **200** A JSON or YAML of a spec object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app` object optional An application's configuration and status. **Show child properties** `active_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `dedicated_ips` array of object optional read-only **Show child properties** `id` string optional Example: `9e7bc2ac-205a-45d6-919c-e1ac5e73f962` `ip` string optional Example: `192.168.1.1` `status` string, one of: UNKNOWN, ASSIGNING, ASSIGNED, REMOVED optional read-only Example: `ASSIGNED` `default_ingress` string optional read-only Example: `digitalocean.com` `domains` array of object optional read-only **Show child properties** `certificate_expires_at` string (date-time) optional read-only Example: `2024-01-29T23:59:59Z` `id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional `rotate_validation_records` boolean optional read-only `spec` object optional **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `validations` array of object optional **Show child properties** `txt_name` string optional read-only Example: `_acme-challenge.app.example.com` `txt_value` string optional read-only Example: `lXLOcN6cPv0nproViNcUHcahD9TrIPlNgdwesj0pYpk` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `in_progress_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `last_deployment_created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `live_domain` string optional read-only Example: `live_domain` `live_url` string optional read-only Example: `google.com` `live_url_base` string optional read-only Example: `digitalocean.com` `owner_uuid` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `pending_deployment` object optional `pinned_deployment` object optional `project_id` string optional read-only Example: `88b72d1a-b78a-4d9f-9090-b53c4399073f` Requires `project:read` scope. `region` object optional **Show child properties** `continent` string optional read-only Example: `europe` `data_centers` array of string optional read-only Example: `["ams"]` `default` boolean optional read-only Example: `true` Whether or not the region is presented as the default. `disabled` boolean optional read-only Example: `true` `flag` string optional read-only Example: `ams` `label` string optional read-only Example: `ams` `reason` string optional read-only Example: `to crowded` `slug` string optional read-only Example: `basic` `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional read-only Example: `2020-12-01T00:42:16Z` `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app": { "active_deployment": { "cause": "manual", "created_at": "2021-02-10T17:05:30Z", "id": "991dfa59-6a23-459f-86d6-67dfa2c6f1e3", "phase": "ACTIVE", "phase_last_updated_at": "2021-02-10T17:06:53Z", "progress": { "steps": [ { "ended_at": "2021-02-10T17:06:19.807834070Z", "name": "build", "started_at": "2021-02-10T17:05:35.572287990Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:05:36.093995229Z", "name": "initialize", "started_at": "2021-02-10T17:05:35.572347485Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:19.461737040Z", "name": "components", "started_at": "2021-02-10T17:05:36.094015928Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404104185Z", "name": "deploy", "started_at": "2021-02-10T17:06:25.143932418Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:06:26.120343872Z", "name": "initialize", "started_at": "2021-02-10T17:06:25.143957508Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:50.029695913Z", "name": "components", "started_at": "2021-02-10T17:06:26.120385561Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "name": "web", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "SUCCESS" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404065961Z", "name": "finalize", "started_at": "2021-02-10T17:06:50.348459495Z", "status": "SUCCESS" } ] } ], "success_steps": 6, "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "db6936cb46047c576962962eed81ad52c21f35d7" } ], "spec": { "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:53Z" }, "created_at": "2021-02-10T16:45:14Z", "dedicated_ips": [ { "id": "c24d8f48-3bc4-49f5-8ca0-58e8164427ac", "ip": "192.168.1.1", "status": "ASSIGNED" }, { "id": "4768fb15-2837-4dda-9be5-3951df4bc3d0", "ip": "192.168.1.2", "status": "ASSIGNED" } ], "default_ingress": "https://sample-golang-zyhgn.ondigitalocean.app", "domains": [ { "certificate_expires_at": "2024-01-29T23:59:59Z", "id": "e206c64e-a1a3-11ed-9e6e-9b7b6dc9a52b", "phase": "CONFIGURING", "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": "RUNNING" }, { "ended_at": "0001-01-01T00:00:00", "name": "create-deployment", "started_at": "0001-01-01T00:00:00Z", "status": "PENDING" }, { "ended_at": "0001-01-01T00:00:00", "name": "configuration-alert", "started_at": "0001-01-01T00:00:00", "status": "PENDING" } ] }, "rotate_validation_records": false, "spec": { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } } ], "id": "c2a93513-8d9b-4223-9d61-5e7272c81cf5", "last_deployment_created_at": "2021-02-10T17:05:30Z", "live_domain": "sample-golang-zyhgn.ondigitalocean.app", "live_url": "https://sample-golang-zyhgn.ondigitalocean.app", "live_url_base": "https://sample-golang-zyhgn.ondigitalocean.app", "owner_uuid": "a4e16f25-cdd1-4483-b246-d77f283c9209", "pending_deployment": { "id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "region": "fra", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } }, "project_id": "88b72d1a-b78a-4d9f-9090-b53c4399073f", "region": { "continent": "Europe", "data_centers": [ "ams3" ], "flag": "netherlands", "label": "Amsterdam", "slug": "ams" }, "spec": { "disable_edge_cache": true, "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:56Z", "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing App `/v2/apps/{id}` Retrieve details about an existing app by either its ID or name. To retrieve an app by its name, do not include an ID in the request path. Information about the current active deployment as well as any in progress ones will also be included in the response. #### Path Parameters `id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The ID of the app #### Query Parameters `name` string optional Example: `myApp` The name of the app to retrieve. ##### Request: `/v2/apps/{id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_resp = client.apps.get(id="4f6c71e2") ``` #### Responses **200** A JSON with key app Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app` object optional An application's configuration and status. **Show child properties** `active_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `dedicated_ips` array of object optional read-only **Show child properties** `id` string optional Example: `9e7bc2ac-205a-45d6-919c-e1ac5e73f962` `ip` string optional Example: `192.168.1.1` `status` string, one of: UNKNOWN, ASSIGNING, ASSIGNED, REMOVED optional read-only Example: `ASSIGNED` `default_ingress` string optional read-only Example: `digitalocean.com` `domains` array of object optional read-only **Show child properties** `certificate_expires_at` string (date-time) optional read-only Example: `2024-01-29T23:59:59Z` `id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional `rotate_validation_records` boolean optional read-only `spec` object optional **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `validations` array of object optional **Show child properties** `txt_name` string optional read-only Example: `_acme-challenge.app.example.com` `txt_value` string optional read-only Example: `lXLOcN6cPv0nproViNcUHcahD9TrIPlNgdwesj0pYpk` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `in_progress_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `last_deployment_created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `live_domain` string optional read-only Example: `live_domain` `live_url` string optional read-only Example: `google.com` `live_url_base` string optional read-only Example: `digitalocean.com` `owner_uuid` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `pending_deployment` object optional `pinned_deployment` object optional `project_id` string optional read-only Example: `88b72d1a-b78a-4d9f-9090-b53c4399073f` Requires `project:read` scope. `region` object optional **Show child properties** `continent` string optional read-only Example: `europe` `data_centers` array of string optional read-only Example: `["ams"]` `default` boolean optional read-only Example: `true` Whether or not the region is presented as the default. `disabled` boolean optional read-only Example: `true` `flag` string optional read-only Example: `ams` `label` string optional read-only Example: `ams` `reason` string optional read-only Example: `to crowded` `slug` string optional read-only Example: `basic` `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional read-only Example: `2020-12-01T00:42:16Z` `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app": { "active_deployment": { "cause": "manual", "created_at": "2021-02-10T17:05:30Z", "id": "991dfa59-6a23-459f-86d6-67dfa2c6f1e3", "phase": "ACTIVE", "phase_last_updated_at": "2021-02-10T17:06:53Z", "progress": { "steps": [ { "ended_at": "2021-02-10T17:06:19.807834070Z", "name": "build", "started_at": "2021-02-10T17:05:35.572287990Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:05:36.093995229Z", "name": "initialize", "started_at": "2021-02-10T17:05:35.572347485Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:19.461737040Z", "name": "components", "started_at": "2021-02-10T17:05:36.094015928Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404104185Z", "name": "deploy", "started_at": "2021-02-10T17:06:25.143932418Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:06:26.120343872Z", "name": "initialize", "started_at": "2021-02-10T17:06:25.143957508Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:50.029695913Z", "name": "components", "started_at": "2021-02-10T17:06:26.120385561Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "name": "web", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "SUCCESS" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404065961Z", "name": "finalize", "started_at": "2021-02-10T17:06:50.348459495Z", "status": "SUCCESS" } ] } ], "success_steps": 6, "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "db6936cb46047c576962962eed81ad52c21f35d7" } ], "spec": { "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:53Z" }, "created_at": "2021-02-10T16:45:14Z", "dedicated_ips": [ { "id": "c24d8f48-3bc4-49f5-8ca0-58e8164427ac", "ip": "192.168.1.1", "status": "ASSIGNED" }, { "id": "4768fb15-2837-4dda-9be5-3951df4bc3d0", "ip": "192.168.1.2", "status": "ASSIGNED" } ], "default_ingress": "https://sample-golang-zyhgn.ondigitalocean.app", "domains": [ { "certificate_expires_at": "2024-01-29T23:59:59Z", "id": "e206c64e-a1a3-11ed-9e6e-9b7b6dc9a52b", "phase": "CONFIGURING", "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": "RUNNING" }, { "ended_at": "0001-01-01T00:00:00", "name": "create-deployment", "started_at": "0001-01-01T00:00:00Z", "status": "PENDING" }, { "ended_at": "0001-01-01T00:00:00", "name": "configuration-alert", "started_at": "0001-01-01T00:00:00", "status": "PENDING" } ] }, "rotate_validation_records": false, "spec": { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } } ], "id": "c2a93513-8d9b-4223-9d61-5e7272c81cf5", "last_deployment_created_at": "2021-02-10T17:05:30Z", "live_domain": "sample-golang-zyhgn.ondigitalocean.app", "live_url": "https://sample-golang-zyhgn.ondigitalocean.app", "live_url_base": "https://sample-golang-zyhgn.ondigitalocean.app", "owner_uuid": "a4e16f25-cdd1-4483-b246-d77f283c9209", "pending_deployment": { "id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "region": "fra", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } }, "project_id": "88b72d1a-b78a-4d9f-9090-b53c4399073f", "region": { "continent": "Europe", "data_centers": [ "ams3" ], "flag": "netherlands", "label": "Amsterdam", "slug": "ams" }, "spec": { "disable_edge_cache": true, "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:56Z", "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update an App `/v2/apps/{id}` Update an existing app by submitting a new app specification. For documentation on app specifications (`AppSpec` objects), please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/reference/app-spec/index.html.md). #### Path Parameters `id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The ID of the app #### Request Body: `application/json` `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `cors` object optional `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. **Show child properties** `component` object optional The component to route to. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `match` object optional The match configuration for the rule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `redirect` object optional The redirect configuration for the rule. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `2` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `60` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port. `success_threshold` integer (int32) optional Example: `3` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `45` The number of seconds after which the check times out. `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `termination` object optional **Show child properties** `drain_seconds` integer (int32) optional Example: `15` The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15) `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. **Show child properties** `max_instance_count` integer (uint32) optional Example: `3` The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances. `metrics` object optional The metrics that the component is scaled on. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `min_instance_count` integer (uint32) optional Example: `2` The minimum amount of instances for this component. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `update_all_source_versions` boolean optional Example: `true` Whether or not to update the source versions (for example fetching a new commit or image digest) of all components. By default (when this is false) only newly added sources will be updated to avoid changes like updating the scale of a component from also updating the respective code. ##### Request: `/v2/apps/{id}` ### Payload Content type `application/json` ```json { "spec": { "databases": [], "disable_edge_cache": false, "disable_email_obfuscation": false, "domains": [], "egress": { "type": "AUTOASSIGN" }, "enhanced_threat_control_enabled": false, "functions": [], "ingress": { "custom_error_page_url": "https://status.example.com/app-unavailable", "rules": [] }, "jobs": [], "maintenance": { "archive": true, "enabled": true, "offline_page_url": "https://example.com/offline.html" }, "name": "web-app-01", "region": "nyc", "services": [], "static_sites": [], "workers": [] }, "update_all_source_versions": true } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}" \ -d '{"alerts":[{"rule":"DEPLOYMENT_FAILED"},{"rule":"DOMAIN_FAILED"}],"domains":[{"domain":"example.com","type":"PRIMARY","zone":"example.com"}],"envs":[{"key":"API_KEY","scope":"RUN_AND_BUILD_TIME","type":"SECRET","value":"EV[1:zqiRIeaaYK/NqctZDYzy6t0pTrtRDez8:wqGpZRrsKN5nPhWQrS479cfBiXT0WQ==]"}],"features":["buildpack-stack=ubuntu-22"],"ingress":{},"name":"example-app","region":"nyc","services":[{"autoscaling":{"max_instance_count":4,"metrics":{"cpu":{"percent":70}},"min_instance_count":2},"git":{"branch":"main","repo_clone_url":"https://github.com/digitalocean/sample-nodejs.git"},"internal_ports":[8080],"log_destinations":[{"name":"your_log_consumer_name","open_search":{"endpoint":"logs.example.com:12345","basic_auth":{"user":"doadmin","password":"1234567890abcdef"},"index_name":"example-index","cluster_name":"example-cluster"}}],"name":"sample-nodejs","run_command":"yarn start","source_dir":"/"}]}' ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "spec": { "name": "web-app-01", "region": "nyc", "domains": [ { "domain": "app.example.com", "type": "DEFAULT", "wildcard": True, "zone": "example.com", "minimum_tls_version": "1.3", } ], "services": [], "static_sites": [ { "cors": { "allow_origins": [ {"exact": "https://www.example.com"}, {"regex": "^.*example.com"}, ], "allow_methods": [ "GET", "OPTIONS", "POST", "PUT", "PATCH", "DELETE", ], "allow_headers": ["Content-Type", "X-Custom-Header"], "expose_headers": ["Content-Encoding", "X-Custom-Header"], "max_age": "5h30m", "allow_credentials": False, }, "routes": [{"path": "/api", "preserve_path_prefix": True}], } ], "jobs": [ { "name": "api", "gitlab": { "branch": "main", "deploy_on_push": True, "repo": "digitalocean/sample-golang", }, "image": { "registry": "registry.hub.docker.com", "registry_type": "DOCR", "repository": "origin/master", "tag": "latest", }, "dockerfile_path": "path/to/Dockerfile", "build_command": "npm run build", "run_command": "bin/api", "source_dir": "path/to/dir", "envs": [ { "key": "BASE_URL", "scope": "BUILD_TIME", "type": "GENERAL", "value": "http://example.com", } ], "environment_slug": "node-js", "log_destinations": { "name": "my_log_destination", "papertrail": { "endpoint": "https://mypapertrailendpoint.com" }, "datadog": { "endpoint": "https://mydatadogendpoint.com", "api_key": "abcdefghijklmnopqrstuvwxyz0123456789", }, "logtail": { "token": "abcdefghijklmnopqrstuvwxyz0123456789" }, "open_search": { "endpoint": "https://myopensearchendpoint.com:9300" "index_name": "logs" "basic_auth": { "user": "doadmin", "password": "password" } }, }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "kind": "PRE_DEPLOY", } ], "workers": [ { "name": "api", "gitlab": { "branch": "main", "deploy_on_push": True, "repo": "digitalocean/sample-golang", }, "image": { "registry": "registry.hub.docker.com", "registry_type": "DOCR", "repository": "origin/master", "tag": "latest", }, "dockerfile_path": "path/to/Dockerfile", "build_command": "npm run build", "run_command": "bin/api", "source_dir": "path/to/dir", "envs": [ { "key": "BASE_URL", "scope": "BUILD_TIME", "type": "GENERAL", "value": "http://example.com", } ], "environment_slug": "node-js", "log_destinations": { "name": "my_log_destination", "papertrail": { "endpoint": "https://mypapertrailendpoint.com" }, "datadog": { "endpoint": "https://mydatadogendpoint.com", "api_key": "abcdefghijklmnopqrstuvwxyz0123456789", }, "logtail": { "token": "abcdefghijklmnopqrstuvwxyz0123456789" }, "open_search": { "endpoint": "https://myopensearchendpoint.com:9300" "index_name": "logs" "basic_auth": { "user": "doadmin", "password": "password" } }, }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", } ], "functions": [ { "cors": { "allow_origins": [ {"exact": "https://www.example.com"}, {"regex": "^.*example.com"}, ], "allow_methods": [ "GET", "OPTIONS", "POST", "PUT", "PATCH", "DELETE", ], "allow_headers": ["Content-Type", "X-Custom-Header"], "expose_headers": ["Content-Encoding", "X-Custom-Header"], "max_age": "5h30m", "allow_credentials": False, }, "routes": [{"path": "/api", "preserve_path_prefix": True}], "name": "api", "source_dir": "path/to/dir", "alerts": [ { "rule": "CPU_UTILIZATION", "disabled": False, "operator": "GREATER_THAN", "value": 2.32, "window": "FIVE_MINUTES", } ], "envs": [ { "key": "BASE_URL", "scope": "BUILD_TIME", "type": "GENERAL", "value": "http://example.com", } ], "gitlab": { "branch": "main", "deploy_on_push": True, "repo": "digitalocean/sample-golang", }, "log_destinations": { "name": "my_log_destination", "papertrail": { "endpoint": "https://mypapertrailendpoint.com" }, "datadog": { "endpoint": "https://mydatadogendpoint.com", "api_key": "abcdefghijklmnopqrstuvwxyz0123456789", }, "logtail": { "token": "abcdefghijklmnopqrstuvwxyz0123456789" }, "open_search": { "endpoint": "https://myopensearchendpoint.com:9300" "index_name": "logs" "basic_auth": { "user": "doadmin", "password": "password" } }, }, } ], "databases": [ { "cluster_name": "cluster_name", "db_name": "my_db", "db_user": "superuser", "engine": "PG", "name": "prod-db", "production": True, "version": "12", } ], “vpc”: { “id”: “c22d8f48-4bc4-49f5-8ca0-58e7164427ac”, } } update_resp = client.apps.update(id="bb245ba", body=req) ``` #### Responses **200** A JSON object of the updated app Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app` object optional An application's configuration and status. **Show child properties** `active_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `dedicated_ips` array of object optional read-only **Show child properties** `id` string optional Example: `9e7bc2ac-205a-45d6-919c-e1ac5e73f962` `ip` string optional Example: `192.168.1.1` `status` string, one of: UNKNOWN, ASSIGNING, ASSIGNED, REMOVED optional read-only Example: `ASSIGNED` `default_ingress` string optional read-only Example: `digitalocean.com` `domains` array of object optional read-only **Show child properties** `certificate_expires_at` string (date-time) optional read-only Example: `2024-01-29T23:59:59Z` `id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional `rotate_validation_records` boolean optional read-only `spec` object optional **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `validations` array of object optional **Show child properties** `txt_name` string optional read-only Example: `_acme-challenge.app.example.com` `txt_value` string optional read-only Example: `lXLOcN6cPv0nproViNcUHcahD9TrIPlNgdwesj0pYpk` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `in_progress_deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `last_deployment_created_at` string (date-time) optional read-only Example: `2020-11-19T20:27:18Z` `live_domain` string optional read-only Example: `live_domain` `live_url` string optional read-only Example: `google.com` `live_url_base` string optional read-only Example: `digitalocean.com` `owner_uuid` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `pending_deployment` object optional `pinned_deployment` object optional `project_id` string optional read-only Example: `88b72d1a-b78a-4d9f-9090-b53c4399073f` Requires `project:read` scope. `region` object optional **Show child properties** `continent` string optional read-only Example: `europe` `data_centers` array of string optional read-only Example: `["ams"]` `default` boolean optional read-only Example: `true` Whether or not the region is presented as the default. `disabled` boolean optional read-only Example: `true` `flag` string optional read-only Example: `ams` `label` string optional read-only Example: `ams` `reason` string optional read-only Example: `to crowded` `slug` string optional read-only Example: `basic` `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional read-only Example: `2020-12-01T00:42:16Z` `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app": { "active_deployment": { "cause": "manual", "created_at": "2021-02-10T17:05:30Z", "id": "991dfa59-6a23-459f-86d6-67dfa2c6f1e3", "phase": "ACTIVE", "phase_last_updated_at": "2021-02-10T17:06:53Z", "progress": { "steps": [ { "ended_at": "2021-02-10T17:06:19.807834070Z", "name": "build", "started_at": "2021-02-10T17:05:35.572287990Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:05:36.093995229Z", "name": "initialize", "started_at": "2021-02-10T17:05:35.572347485Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:19.461737040Z", "name": "components", "started_at": "2021-02-10T17:05:36.094015928Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404104185Z", "name": "deploy", "started_at": "2021-02-10T17:06:25.143932418Z", "status": "SUCCESS", "steps": [ { "ended_at": "2021-02-10T17:06:26.120343872Z", "name": "initialize", "started_at": "2021-02-10T17:06:25.143957508Z", "status": "SUCCESS" }, { "ended_at": "2021-02-10T17:06:50.029695913Z", "name": "components", "started_at": "2021-02-10T17:06:26.120385561Z", "status": "SUCCESS", "steps": [ { "component_name": "web", "name": "web", "status": "SUCCESS", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "SUCCESS" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "SUCCESS" } ] } ] }, { "ended_at": "2021-02-10T17:06:53.404065961Z", "name": "finalize", "started_at": "2021-02-10T17:06:50.348459495Z", "status": "SUCCESS" } ] } ], "success_steps": 6, "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "db6936cb46047c576962962eed81ad52c21f35d7" } ], "spec": { "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:53Z" }, "created_at": "2021-02-10T16:45:14Z", "dedicated_ips": [ { "id": "c24d8f48-3bc4-49f5-8ca0-58e8164427ac", "ip": "192.168.1.1", "status": "ASSIGNED" }, { "id": "4768fb15-2837-4dda-9be5-3951df4bc3d0", "ip": "192.168.1.2", "status": "ASSIGNED" } ], "default_ingress": "https://sample-golang-zyhgn.ondigitalocean.app", "domains": [ { "certificate_expires_at": "2024-01-29T23:59:59Z", "id": "e206c64e-a1a3-11ed-9e6e-9b7b6dc9a52b", "phase": "CONFIGURING", "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": "RUNNING" }, { "ended_at": "0001-01-01T00:00:00", "name": "create-deployment", "started_at": "0001-01-01T00:00:00Z", "status": "PENDING" }, { "ended_at": "0001-01-01T00:00:00", "name": "configuration-alert", "started_at": "0001-01-01T00:00:00", "status": "PENDING" } ] }, "rotate_validation_records": false, "spec": { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } } ], "id": "c2a93513-8d9b-4223-9d61-5e7272c81cf5", "last_deployment_created_at": "2021-02-10T17:05:30Z", "live_domain": "sample-golang-zyhgn.ondigitalocean.app", "live_url": "https://sample-golang-zyhgn.ondigitalocean.app", "live_url_base": "https://sample-golang-zyhgn.ondigitalocean.app", "owner_uuid": "a4e16f25-cdd1-4483-b246-d77f283c9209", "pending_deployment": { "id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "spec": { "domains": [ { "domain": "sample-php.example.com", "minimum_tls_version": "1.3", "type": "PRIMARY", "zone": "example.com" } ], "name": "sample-php", "region": "fra", "services": [ { "environment_slug": "php", "git": { "branch": "main", "repo_clone_url": "https://github.com/digitalocean/sample-php.git" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "sample-php", "routes": [ { "path": "/" } ], "run_command": "heroku-php-apache2" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } }, "project_id": "88b72d1a-b78a-4d9f-9090-b53c4399073f", "region": { "continent": "Europe", "data_centers": [ "ams3" ], "flag": "netherlands", "label": "Amsterdam", "slug": "ams" }, "spec": { "disable_edge_cache": true, "domains": [ { "domain": "sample-golang.example.com", "minimum_tls_version": "1.3", "zone": "example.com" } ], "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "main", "repo": "ChiefMateStarbuck/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ], "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } }, "tier_slug": "basic", "updated_at": "2021-02-10T17:06:56Z", "vpc": { "egress_ips": [ { "ip": "10.0.0.1" } ], "id": "c22d8f48-4bc4-49f5-8ca0-58e7164427ac" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an App `/v2/apps/{id}` Delete an existing app. Once deleted, all active deployments will be permanently shut down and the app deleted. If needed, be sure to back up your app specification so that you may re-create it at a later time. #### Path Parameters `id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The ID of the app ##### Request: `/v2/apps/{id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.apps.delete(id="b7d64052") ``` #### Responses **200** the ID of the app deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "id": "b7d64052-3706-4cb7-b21a-c5a2f44e63b3" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Restart an App `/v2/apps/{app_id}/restart` Perform a rolling restart of all or specific components in an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Request Body: `application/json` `components` array of string optional Example: `["component1","component2"]` ##### Request: `/v2/apps/{app_id}/restart` ### Payload Content type `application/json` ```json { "components": [ "component1", "component2" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/restart" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_resp = client.apps.restart(app_id="b6bdf840", body={"components": ["component1", "component2"]}) ``` #### Responses **200** A JSON object with a deployment key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Active Deployment Logs `/v2/apps/{app_id}/components/{component_name}/logs` Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `component_name` string required Example: `component` An optional component name. If set, logs will be limited to this component only. #### Query Parameters `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string (enum) required Example: `BUILD` The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) Default: `UNSPECIFIED` `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. ##### Request: `/v2/apps/{app_id}/components/{component_name}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/components/{component_name}/logs" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_logs_active_deployment(app_id="a6adf840", component_name="component") ``` #### Responses **200** A JSON object with urls that point to archived logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Exec URL `/v2/apps/{app_id}/components/{component_name}/exec` Returns a websocket URL that allows sending/receiving console input and output to a component of the active deployment if one exists. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `component_name` string required Example: `component` An optional component name. If set, logs will be limited to this component only. #### Query Parameters `instance_name` string optional Example: `go-app-d768568df-zz77d` The name of the actively running ephemeral compute instance ##### Request: `/v2/apps/{app_id}/components/{component_name}/exec` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/components/{component_name}/exec" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_exec_active_deployment(app_id="a6adf840", component_name="component") ``` #### Responses **200** A JSON object with a websocket URL that allows sending/receiving console input and output. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `url` string optional Example: `wss://exec/?token=xxx` A websocket URL that allows sending/receiving console input and receiving console output. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "url": "wss://exec/?token=xxx" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve App Instances `/v2/apps/{app_id}/instances` Retrieve the list of running instances for a given application, including instance names and component types. Please note that these instances are ephemeral and may change over time. It is recommended not to make persistent changes or develop scripts that rely on their persistence. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID ##### Request: `/v2/apps/{app_id}/instances` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}/instances" ``` #### Responses **200** A JSON with key instances Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `instances` array of object optional **Show child properties** `component_name` string optional Example: `sample-golang` Name of the component, from the app spec. `component_type` string, one of: SERVICE, WORKER, JOB optional Example: `SERVICE` Supported compute component by DigitalOcean App Platform. `instance_alias` string optional Example: `sample-golang-0` Readable identifier, an alias of the instance name, reference for mapping insights to instance names. `instance_name` string optional Example: `sample-golang-76b84c7fb8-6p8kq` Name of the instance, which is a unique identifier for the instance. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "instances": [ { "component_name": "sample-golang", "component_type": "SERVICE", "instance_alias": "sample-golang-0", "instance_name": "sample-golang-76b84c7fb8-6p8kq" }, { "component_name": "sample-golang", "component_type": "SERVICE", "instance_alias": "sample-golang-1", "instance_name": "sample-golang-76b84c7fb8-ngvpc" }, { "component_name": "sample-php", "component_type": "SERVICE", "instance_alias": "sample-php-0", "instance_name": "sample-php-767c6b49c4-dkgpt" }, { "component_name": "sample-php", "component_type": "SERVICE", "instance_alias": "sample-php-1", "instance_name": "sample-php-767c6b49c4-z8dll" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List App Deployments `/v2/apps/{app_id}/deployments` List all deployments of an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Query Parameters `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `deployment_types` array of string (enum) optional Example: `["MANUAL","AUTOSCALED"]` Optional. Filter deployments by deployment_type - MANUAL: manual deployment - DEPLOY_ON_PUSH: deployment triggered by a push to the app's repository - MAINTENANCE: deployment for maintenance purposes - MANUAL_ROLLBACK: manual revert to a previous deployment - AUTO_ROLLBACK: automatic revert to a previous deployment - UPDATE_DATABASE_TRUSTED_SOURCES: update database trusted sources - AUTOSCALED: deployment that has been autoscaled ##### Request: `/v2/apps/{app_id}/deployments` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_deployments(app_id="4f6c71e2") ``` #### Responses **200** A JSON object with a deployments key. This will be a list of all app deployments Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployments` array of object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployments": [ { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } ], "links": { "pages": {} }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an App Deployment `/v2/apps/{app_id}/deployments` Creating an app deployment will pull the latest changes from your repository and schedule a new deployment for your app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Request Body: `application/json` `force_build` boolean optional Example: `true` ##### Request: `/v2/apps/{app_id}/deployments` ### Payload Content type `application/json` ```json { "force_build": true } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_resp = client.apps.create_deployment(app_id="b6bdf840", body={"force_build": True}) ``` #### Responses **200** A JSON object with a deployment key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an App Deployment `/v2/apps/{app_id}/deployments/{deployment_id}` Retrieve information about an app deployment. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `deployment_id` string required Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID ##### Request: `/v2/apps/{app_id}/deployments/{deployment_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_deployment(app_id="a6adf840", deployment_id="b6bdf840") ``` #### Responses **200** A JSON of the requested deployment Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Cancel a Deployment `/v2/apps/{app_id}/deployments/{deployment_id}/cancel` Immediately cancel an in-progress deployment. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `deployment_id` string required Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID ##### Request: `/v2/apps/{app_id}/deployments/{deployment_id}/cancel` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/cancel" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) cancel_resp = client.apps.cancel_deployment("12345", "24556") ``` #### Responses **200** A JSON the deployment that was just cancelled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Deployment Logs `/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs` Retrieve the logs of a past, in-progress, or active deployment. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `deployment_id` string required Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID `component_name` string required Example: `component` An optional component name. If set, logs will be limited to this component only. #### Query Parameters `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string (enum) required Example: `BUILD` The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) Default: `UNSPECIFIED` `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. ##### Request: `/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/logs" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_logs(app_id="4f6c71e2", deployment_id="3aa4d20e", component_name="component") ``` #### Responses **200** A JSON object with urls that point to archived logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Aggregate Deployment Logs `/v2/apps/{app_id}/deployments/{deployment_id}/logs` Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `deployment_id` string required Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID #### Query Parameters `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string (enum) required Example: `BUILD` The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) Default: `UNSPECIFIED` `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. ##### Request: `/v2/apps/{app_id}/deployments/{deployment_id}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/logs" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_logs_aggregate(app_id="b6bdf840", deployment_id="a6adf840") ``` #### Responses **200** A JSON object with urls that point to archived logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Exec URL for Deployment `/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/exec` Returns a websocket URL that allows sending/receiving console input and output to a component of the specified deployment if one exists. Optionally, the instance_name parameter can be provided to retrieve the exec URL for a specific instance. Note that instances are ephemeral; therefore, we recommended to avoid making persistent changes or such scripting around them. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `deployment_id` string required Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID `component_name` string required Example: `component` An optional component name. If set, logs will be limited to this component only. #### Query Parameters `instance_name` string optional Example: `go-app-d768568df-zz77d` The name of the actively running ephemeral compute instance ##### Request: `/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/exec` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/deployments/{deployment_id}/components/{component_name}/exec" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_exec(app_id="4f6c71e2", deployment_id="3aa4d20e", component_name="component") ``` #### Responses **200** A JSON object with a websocket URL that allows sending/receiving console input and output. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `url` string optional Example: `wss://exec/?token=xxx` A websocket URL that allows sending/receiving console input and receiving console output. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "url": "wss://exec/?token=xxx" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Active Deployment Aggregate Logs `/v2/apps/{app_id}/logs` Retrieve the logs of the active deployment if one exists. The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. Note log_type=BUILD logs will return logs associated with the current active deployment (being served). To view build logs associated with in-progress build, the query must explicitly reference the deployment id. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Query Parameters `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string (enum) required Example: `BUILD` The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) Default: `UNSPECIFIED` `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. ##### Request: `/v2/apps/{app_id}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/logs" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_logs_active_deployment_aggregate(app_id="a6adf840") ``` #### Responses **200** A JSON object with urls that point to archived logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Job Invocations `/v2/apps/{app_id}/job-invocations` List all job invocations for an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Query Parameters `job_names` array of string optional Example: `["component1","component2"]` The job names to list job invocations for. `deployment_id` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` ##### Request: `/v2/apps/{app_id}/job-invocations` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/job-invocations" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_job_invocations(app_id="4f6c71e2") ``` #### Responses **200** A JSON with key job_invocations Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `job_invocations` array of object optional **Show child properties** `completed_at` string (date-time) optional Example: `2023-10-01T12:10:00Z` `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `job_name` string optional Example: `good-job` `phase` string (enum) optional Example: `SUCCEEDED` The phase of the job invocation `started_at` string (date-time) optional Example: `2023-10-01T12:05:00Z` `trigger` object optional **Show child properties** `manual` object optional Details about the manual trigger, if applicable **Show child properties** `user` object optional The user who triggered the job *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `scheduled` object optional Example: `{"schedule":{"cron":"0 0 * * *","time_zone":"America/New_York"}}` The schedule for the job **Show child properties** `schedule` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: MANUAL, SCHEDULE, UNKNOWN optional Example: `MANUAL` The type of trigger that initiated the job invocation. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job_invocations": [ { "completed_at": "2025-09-11T11:04:40Z", "created_at": "2025-09-11T11:04:05Z", "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "job_name": "good-job", "phase": "SUCCEEDED", "started_at": "2025-09-11T11:04:10Z", "trigger": { "properties": { "scheduled": { "properties": { "schedule": { "properties": { "cron": { "example": "*/2 * * * *", "type": "string" }, "time_zone": { "example": "UTC", "type": "string" } }, "type": "object" } }, "type": "object" }, "type": { "type": "string" } }, "type": "SCHEDULE" } } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Job Invocations `/v2/apps/{app_id}/job-invocations/{job_invocation_id}` Get a specific job invocation for an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `job_invocation_id` string required Example: `123e4567-e89b-12d3-a456-426` The ID of the job invocation to retrieve. #### Query Parameters `job_name` string optional Example: `component` The job name to list job invocations for. ##### Request: `/v2/apps/{app_id}/job-invocations/{job_invocation_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/job-invocations/{job_invocation_id}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_job_invocation(app_id="4f6c71e2", job_invocation_id="3aa4d20e") ``` #### Responses **200** A JSON with key job_invocation Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `completed_at` string (date-time) optional Example: `2023-10-01T12:10:00Z` `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `job_name` string optional Example: `good-job` `phase` string (enum) optional Example: `SUCCEEDED` The phase of the job invocation `started_at` string (date-time) optional Example: `2023-10-01T12:05:00Z` `trigger` object optional **Show child properties** `manual` object optional Details about the manual trigger, if applicable **Show child properties** `user` object optional The user who triggered the job **Show child properties** `email` string (email) optional Example: `user@example.com` `full_name` string optional Example: `John Doe` `uuid` string optional Example: `550e8400-e29b-41d4-a716-446655440000` `scheduled` object optional Example: `{"schedule":{"cron":"0 0 * * *","time_zone":"America/New_York"}}` The schedule for the job **Show child properties** `schedule` object optional **Show child properties** `cron` string optional Example: `0 0 * * *` The cron expression defining the schedule `time_zone` string optional Example: `America/New_York` The time zone for the schedule `type` string, one of: MANUAL, SCHEDULE, UNKNOWN optional Example: `MANUAL` The type of trigger that initiated the job invocation. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job_invocation": [ { "completed_at": "2025-09-11T11:04:40Z", "created_at": "2025-09-11T11:04:05Z", "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "job_name": "good-job", "phase": "SUCCEEDED", "started_at": "2025-09-11T11:04:10Z", "trigger": [ { "scheduled": [ { "schedule": { "cron": "*/2 * * * *", "time_zone": "UTC" } } ], "type": "SCHEDULED" } ] } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Cancel Job Invocation `/v2/apps/{app_id}/job-invocations/{job_invocation_id}/cancel` Cancel a specific job invocation for an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `job_invocation_id` string required Example: `123e4567-e89b-12d3-a456-426` The ID of the job invocation to retrieve. #### Query Parameters `job_name` string optional Example: `component` The job name to list job invocations for. ##### Request: `/v2/apps/{app_id}/job-invocations/{job_invocation_id}/cancel` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/job-invocations/{job_invocation_id}/cancel" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.cancel_job_invocation(app_id="4f6c71e2", job_invocation_id="3aa4d20e") ``` #### Responses **200** A JSON with key job_invocation Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `completed_at` string (date-time) optional Example: `2023-10-01T12:10:00Z` `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `job_name` string optional Example: `good-job` `phase` string (enum) optional Example: `SUCCEEDED` The phase of the job invocation `started_at` string (date-time) optional Example: `2023-10-01T12:05:00Z` `trigger` object optional **Show child properties** `manual` object optional Details about the manual trigger, if applicable **Show child properties** `user` object optional The user who triggered the job **Show child properties** `email` string (email) optional Example: `user@example.com` `full_name` string optional Example: `John Doe` `uuid` string optional Example: `550e8400-e29b-41d4-a716-446655440000` `scheduled` object optional Example: `{"schedule":{"cron":"0 0 * * *","time_zone":"America/New_York"}}` The schedule for the job **Show child properties** `schedule` object optional **Show child properties** `cron` string optional Example: `0 0 * * *` The cron expression defining the schedule `time_zone` string optional Example: `America/New_York` The time zone for the schedule `type` string, one of: MANUAL, SCHEDULE, UNKNOWN optional Example: `MANUAL` The type of trigger that initiated the job invocation. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "job_invocation": [ { "completed_at": "2025-09-11T11:04:40Z", "created_at": "2025-09-11T11:04:05Z", "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "job_name": "good-job", "phase": "SUCCEEDED", "started_at": "2025-09-11T11:04:10Z", "trigger": [ { "scheduled": [ { "schedule": { "cron": "*/2 * * * *", "time_zone": "UTC" } } ], "type": "SCHEDULED" } ] } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Job Invocation Logs `/v2/apps/{app_id}/jobs/{job_name}/invocations/{job_invocation_id}/logs` Retrieve the logs of a past, in-progress, or active deployment. If a component name is specified, the logs will be limited to only that component. If deployment is omitted the active deployment will be selected (if available). The response will include links to either real-time logs of an in-progress or active deployment or archived logs of a past deployment. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `job_name` string required Example: `component` The job name to list job invocations for. `job_invocation_id` string required Example: `123e4567-e89b-12d3-a456-426` The ID of the job invocation to retrieve. #### Query Parameters `deployment_id` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The deployment ID `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string, one of: JOB_INVOCATION required Example: `JOB_INVOCATION` The type of logs to retrieve `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. `tail_lines` string (int64) optional Example: `100` The number of lines from the end of the logs to retrieve. ##### Request: `/v2/apps/{app_id}/jobs/{job_name}/invocations/{job_invocation_id}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/jobs/{job_name}/invocations/{job_invocation_id}/logs" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_job_invocation_logs(app_id="4f6c71e2", job_name="component", job_invocation_id="3aa4d20e") ``` #### Responses **200** A JSON object with urls that point to Job Invocation logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List App Events `/v2/apps/{app_id}/events` List all events for an app, including deployments and autoscaling events. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Query Parameters `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `event_types` array of string, one of: UNKNOWN, DEPLOYMENT, AUTOSCALING optional Example: `["DEPLOYMENT"]` Filter events by event type. ##### Request: `/v2/apps/{app_id}/events` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/events" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_events(app_id="4f6c71e2") ``` #### Responses **200** A JSON with key events Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `events` array of object optional **Show child properties** `autoscaling` object optional Autoscaling event details. Only present for autoscaling events. **Show child properties** `components` object optional Map of component names to their scale changes **Show child properties** `(additional properties)` object optional Additional properties are allowed. `phase` string (enum) optional Example: `SUCCEEDED` The current phase of the autoscaling event `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` For deployment events, this is the same as the deployment's ID. For autoscaling events, this is the deployment that was autoscaled. `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `type` string, one of: UNKNOWN, DEPLOYMENT, AUTOSCALING optional Example: `DEPLOYMENT` The type of event `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "events": [ { "created_at": "2023-10-01T12:00:00Z", "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "type": "DEPLOYMENT" } ], "links": { "pages": { "pages": { "first": "https://api.digitalocean.com/v2/account/keys?page=1", "prev": "https://api.digitalocean.com/v2/account/keys?page=2" } } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get an Event `/v2/apps/{app_id}/events/{event_id}` Get a single event for an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `event_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The event ID ##### Request: `/v2/apps/{app_id}/events/{event_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/events/{event_id}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_event(app_id="4f6c71e2", event_id="3aa4d20e") ``` #### Responses **200** A JSON with key event Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `event` object optional **Show child properties** `autoscaling` object optional Autoscaling event details. Only present for autoscaling events. **Show child properties** `components` object optional Map of component names to their scale changes **Show child properties** `(additional properties)` object optional Additional properties are allowed. `phase` string (enum) optional Example: `SUCCEEDED` The current phase of the autoscaling event `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` For deployment events, this is the same as the deployment's ID. For autoscaling events, this is the deployment that was autoscaled. `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `type` string, one of: UNKNOWN, DEPLOYMENT, AUTOSCALING optional Example: `DEPLOYMENT` The type of event **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "event": { "autoscaling": { "phase": "SUCCEEDED" }, "created_at": "2023-10-01T12:00:00Z", "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "cloned_from": "3aa4d20e-5527-4c00-b496-601fbd22520a", "created_at": "2020-07-28T18:00:00Z", "functions": [], "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "jobs": [], "phase": "ACTIVE", "phase_last_updated_at": "0001-01-01T00:00:00Z", "services": [], "static_sites": [], "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z", "workers": [] }, "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "type": "DEPLOYMENT" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Cancel an Event `/v2/apps/{app_id}/events/{event_id}/cancel` Cancel an in-progress autoscaling event. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `event_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The event ID ##### Request: `/v2/apps/{app_id}/events/{event_id}/cancel` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/events/{event_id}/cancel" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.cancel_event(app_id="4f6c71e2", event_id="3aa4d20e") ``` #### Responses **200** A JSON with key event Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `event` object optional **Show child properties** `autoscaling` object optional Autoscaling event details. Only present for autoscaling events. **Show child properties** `components` object optional Map of component names to their scale changes **Show child properties** `(additional properties)` object optional Additional properties are allowed. `phase` string (enum) optional Example: `SUCCEEDED` The current phase of the autoscaling event `created_at` string (date-time) optional Example: `2023-10-01T12:00:00Z` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `egress` object optional Specification for app egress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `ingress` object optional Specification for app ingress configurations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `deployment_id` string optional Example: `c020763f-ddb7-4112-a0df-7f01c69fc00b` For deployment events, this is the same as the deployment's ID. For autoscaling events, this is the deployment that was autoscaled. `id` string optional Example: `ba32b134-569c-4c0c-ba02-8ffdb0492ece` `type` string, one of: UNKNOWN, DEPLOYMENT, AUTOSCALING optional Example: `DEPLOYMENT` The type of event **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "event": { "autoscaling": { "phase": "SUCCEEDED" }, "created_at": "2023-10-01T12:00:00Z", "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "cloned_from": "3aa4d20e-5527-4c00-b496-601fbd22520a", "created_at": "2020-07-28T18:00:00Z", "functions": [], "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "jobs": [], "phase": "ACTIVE", "phase_last_updated_at": "0001-01-01T00:00:00Z", "services": [], "static_sites": [], "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z", "workers": [] }, "deployment_id": "c020763f-ddb7-4112-a0df-7f01c69fc00b", "id": "ba32b134-569c-4c0c-ba02-8ffdb0492ece", "type": "DEPLOYMENT" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Event Logs `/v2/apps/{app_id}/events/{event_id}/logs` Retrieve the logs of an autoscaling event for an app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `event_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The event ID #### Query Parameters `follow` boolean optional Example: `true` Whether the logs should follow live updates. `type` string (enum) required Example: `BUILD` The type of logs to retrieve - BUILD: Build-time logs - DEPLOY: Deploy-time logs - RUN: Live run-time logs - RUN_RESTARTED: Logs of crashed/restarted instances during runtime - AUTOSCALE_EVENT: Logs of an autoscaling event (requires event_id) Default: `UNSPECIFIED` `pod_connection_timeout` string optional Example: `3m` An optional time duration to wait if the underlying component instance is not immediately available. Default: `3m`. ##### Request: `/v2/apps/{app_id}/events/{event_id}/logs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/events/{event_id}/logs?type=AUTOSCALE_EVENT" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_event_logs(app_id="4f6c71e2", event_id="3aa4d20e") ``` #### Responses **200** A JSON object with urls that point to archived logs Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `historic_urls` array of string optional `live_url` string optional Example: `ws://logs/build` A URL of the real-time live logs. This URL may use either the `https://` or `wss://` protocols and will keep pushing live logs as they become available. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "historic_logs": [ "https://logs-example/archive/build.log" ], "live_url": "https://logs-example/build.log", "url": "https://logs/build.log" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Instance Sizes `/v2/apps/tiers/instance_sizes` List all instance sizes for `service`, `worker`, and `job` components. ##### Request: `/v2/apps/tiers/instance_sizes` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/tiers/instance_sizes" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_instance_sizes() ``` #### Responses **200** A JSON with key instance_sizes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `discount_percent` number (float) optional Example: `2.32` `instance_sizes` array of object optional **Show child properties** `bandwidth_allowance_gib` string (int64) optional Example: `1` `cpu_type` string, one of: UNSPECIFIED, SHARED, DEDICATED optional Example: `SHARED` `cpus` string (int64) optional Example: `3` `deprecation_intent` boolean optional Example: `true` `memory_bytes` string (int64) optional Example: `1048` `name` string optional Example: `name` `scalable` boolean optional Example: `false` `single_instance_only` boolean optional Example: `true` `slug` string optional Example: `apps-s-1vcpu-1gb` `tier_downgrade_to` string optional Deprecated Example: `basic` `tier_slug` string optional Example: `basic` `tier_upgrade_to` string optional Deprecated Example: `basic` `usd_per_month` string optional Example: `23` `usd_per_second` string optional Example: `0.00000001232` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "instance_sizes": [ { "bandwidth_allowance_gib": "50", "cpu_type": "SHARED", "cpus": "1", "memory_bytes": "536870912", "name": "Shared 1VCPU 0.5GB", "single_instance_only": true, "slug": "apps-s-1vcpu-0.5gb", "tier_slug": "basic", "usd_per_month": "5.00", "usd_per_second": "0.000002066799" }, { "bandwidth_allowance_gib": "100", "cpu_type": "SHARED", "cpus": "1", "memory_bytes": "1073741824", "name": "Shared 1VCPU 1GB Fixed", "single_instance_only": true, "slug": "apps-s-1vcpu-1gb-fixed", "tier_slug": "basic", "usd_per_month": "10.00", "usd_per_second": "0.000004133598" }, { "bandwidth_allowance_gib": "150", "cpu_type": "SHARED", "cpus": "1", "memory_bytes": "1073741824", "name": "Shared 1VCPU 1GB", "slug": "apps-s-1vcpu-1gb", "tier_slug": "professional", "usd_per_month": "12.00", "usd_per_second": "0.000004960317" }, { "bandwidth_allowance_gib": "200", "cpu_type": "SHARED", "cpus": "1", "memory_bytes": "2147483648", "name": "Shared 1VCPU 2GB", "slug": "apps-s-1vcpu-2gb", "tier_slug": "professional", "usd_per_month": "25.00", "usd_per_second": "0.000010333995" }, { "bandwidth_allowance_gib": "250", "cpu_type": "SHARED", "cpus": "2", "memory_bytes": "4294967296", "name": "Shared 2VCPU 4GB", "slug": "apps-s-2vcpu-4gb", "tier_slug": "professional", "usd_per_month": "50.00", "usd_per_second": "0.000020667989" }, { "bandwidth_allowance_gib": "100", "cpu_type": "DEDICATED", "cpus": "1", "memory_bytes": "536870912", "name": "Dedicated 1VCPU 0.5GB", "scalable": true, "slug": "apps-d-1vcpu-0.5gb", "tier_slug": "professional", "usd_per_month": "29.00", "usd_per_second": "0.000011987434" }, { "bandwidth_allowance_gib": "200", "cpu_type": "DEDICATED", "cpus": "1", "memory_bytes": "1073741824", "name": "Dedicated 1VCPU 1GB", "scalable": true, "slug": "apps-d-1vcpu-1gb", "tier_slug": "professional", "usd_per_month": "34.00", "usd_per_second": "0.000014054233" }, { "bandwidth_allowance_gib": "300", "cpu_type": "DEDICATED", "cpus": "1", "memory_bytes": "2147483648", "name": "Dedicated 1VCPU 2GB", "scalable": true, "slug": "apps-d-1vcpu-2gb", "tier_slug": "professional", "usd_per_month": "39.00", "usd_per_second": "0.000016121032" }, { "bandwidth_allowance_gib": "400", "cpu_type": "DEDICATED", "cpus": "1", "memory_bytes": "4294967296", "name": "Dedicated 1VCPU 4GB", "scalable": true, "slug": "apps-d-1vcpu-4gb", "tier_slug": "professional", "usd_per_month": "49.00", "usd_per_second": "0.000020254630" }, { "bandwidth_allowance_gib": "500", "cpu_type": "DEDICATED", "cpus": "2", "memory_bytes": "4294967296", "name": "Dedicated 2VCPU 4GB", "scalable": true, "slug": "apps-d-2vcpu-4gb", "tier_slug": "professional", "usd_per_month": "78.00", "usd_per_second": "0.000032242063" }, { "bandwidth_allowance_gib": "600", "cpu_type": "DEDICATED", "cpus": "2", "memory_bytes": "8589934592", "name": "Dedicated 2VCPU 8GB", "scalable": true, "slug": "apps-d-2vcpu-8gb", "tier_slug": "professional", "usd_per_month": "98.00", "usd_per_second": "0.000040509259" }, { "bandwidth_allowance_gib": "700", "cpu_type": "DEDICATED", "cpus": "4", "memory_bytes": "8589934592", "name": "Dedicated 4VCPU 8GB", "scalable": true, "slug": "apps-d-4vcpu-8gb", "tier_slug": "professional", "usd_per_month": "156.00", "usd_per_second": "0.000064484127" }, { "bandwidth_allowance_gib": "800", "cpu_type": "DEDICATED", "cpus": "4", "memory_bytes": "17179869184", "name": "Dedicated 4VCPU 16GB", "scalable": true, "slug": "apps-d-4vcpu-16gb", "tier_slug": "professional", "usd_per_month": "196.00", "usd_per_second": "0.000081018519" }, { "bandwidth_allowance_gib": "900", "cpu_type": "DEDICATED", "cpus": "8", "memory_bytes": "34359738368", "name": "Dedicated 8VCPU 32GB", "scalable": true, "slug": "apps-d-8vcpu-32gb", "tier_slug": "professional", "usd_per_month": "392.00", "usd_per_second": "0.000162037037" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Instance Size `/v2/apps/tiers/instance_sizes/{slug}` Retrieve information about a specific instance size for `service`, `worker`, and `job` components. #### Path Parameters `slug` string required Example: `apps-s-1vcpu-0.5gb` The slug of the instance size ##### Request: `/v2/apps/tiers/instance_sizes/{slug}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/tiers/instance_sizes/{slug}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_instance_size(slug="apps-s-1vcpu-0.5gb") ``` #### Responses **200** A JSON with key instance_size Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `instance_size` object optional **Show child properties** `bandwidth_allowance_gib` string (int64) optional Example: `1` `cpu_type` string, one of: UNSPECIFIED, SHARED, DEDICATED optional Example: `SHARED` `cpus` string (int64) optional Example: `3` `deprecation_intent` boolean optional Example: `true` `memory_bytes` string (int64) optional Example: `1048` `name` string optional Example: `name` `scalable` boolean optional Example: `false` `single_instance_only` boolean optional Example: `true` `slug` string optional Example: `apps-s-1vcpu-1gb` `tier_downgrade_to` string optional Deprecated Example: `basic` `tier_slug` string optional Example: `basic` `tier_upgrade_to` string optional Deprecated Example: `basic` `usd_per_month` string optional Example: `23` `usd_per_second` string optional Example: `0.00000001232` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "instance_size": { "bandwidth_allowance_gib": "50", "cpu_type": "SHARED", "cpus": "1", "memory_bytes": "536870912", "name": "Shared 1VCPU 0.5GB", "single_instance_only": true, "slug": "apps-s-1vcpu-0.5gb", "tier_slug": "basic", "usd_per_month": "5.00", "usd_per_second": "0.000002066799" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List App Regions `/v2/apps/regions` List all regions supported by App Platform. ##### Request: `/v2/apps/regions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/regions" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_regions() ``` #### Responses **200** A JSON object with key regions Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `regions` array of object optional **Show child properties** `continent` string optional read-only Example: `europe` `data_centers` array of string optional read-only Example: `["ams"]` `default` boolean optional read-only Example: `true` Whether or not the region is presented as the default. `disabled` boolean optional read-only Example: `true` `flag` string optional read-only Example: `ams` `label` string optional read-only Example: `ams` `reason` string optional read-only Example: `to crowded` `slug` string optional read-only Example: `basic` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "regions": [ { "continent": "Europe", "data_centers": [ "ams3" ], "flag": "netherlands", "label": "Amsterdam", "slug": "ams" }, { "continent": "North America", "data_centers": [ "nyc1", "nyc3" ], "default": true, "flag": "usa", "label": "New York", "slug": "nyc" }, { "continent": "Europe", "data_centers": [ "fra1" ], "flag": "germany", "label": "Frankfurt", "slug": "fra" }, { "continent": "North America", "data_centers": [ "sfo3" ], "flag": "usa", "label": "San Francisco", "slug": "sfo" }, { "continent": "Asia", "data_centers": [ "sgp1" ], "flag": "singapore", "label": "Singapore", "slug": "sgp" }, { "continent": "Asia", "data_centers": [ "blr1" ], "flag": "india", "label": "Bangalore", "slug": "blr" }, { "continent": "North America", "data_centers": [ "tor1" ], "flag": "canada", "label": "Toronto", "slug": "tor" }, { "continent": "Europe", "data_centers": [ "lon1" ], "flag": "uk", "label": "London", "slug": "lon" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Propose an App Spec `/v2/apps/propose` To propose and validate a spec for a new or existing app, send a POST request to the `/v2/apps/propose` endpoint. The request returns some information about the proposed app, including app cost and upgrade cost. If an existing app ID is specified, the app spec is treated as a proposed update to the existing app. #### Request Body: `application/json` `app_id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` An optional ID of an existing app. If set, the spec will be treated as a proposed update to the specified app. The existing app is not modified using this method. `spec` object required The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `cors` object optional `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. **Show child properties** `component` object optional The component to route to. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `match` object optional The match configuration for the rule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `redirect` object optional The redirect configuration for the rule. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `2` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `60` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port. `success_threshold` integer (int32) optional Example: `3` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `45` The number of seconds after which the check times out. `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `termination` object optional **Show child properties** `drain_seconds` integer (int32) optional Example: `15` The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15) `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. **Show child properties** `max_instance_count` integer (uint32) optional Example: `3` The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances. `metrics` object optional The metrics that the component is scaled on. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `min_instance_count` integer (uint32) optional Example: `2` The minimum amount of instances for this component. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) ##### Request: `/v2/apps/propose` ### Payload Content type `application/json` ```json { "app_id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "spec": { "name": "web-app", "region": "nyc", "services": [ { "environment_slug": "node-js", "github": { "branch": "main", "deploy_on_push": true, "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "api", "routes": [ { "path": "/api" } ], "run_command": "bin/api" } ] } } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "app_id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "spec": { "name": "web-app", "region": "nyc", "services": [ { "environment_slug": "node-js", "github": { "branch": "main", "deploy_on_push": true, "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "api", "routes": [ { "path": "/api" } ], "run_command": "bin/api" } ] } }' \ "https://api.digitalocean.com/v2/apps/propose" ``` #### Responses **200** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app_cost` integer (int32) optional Example: `5` The monthly cost of the proposed app in USD. `app_is_static` boolean optional Example: `true` Indicates whether the app is a static app. `app_name_available` boolean optional Example: `true` Indicates whether the app name is available. `app_name_suggestion` string optional Example: `newName` The suggested name if the proposed app name is unavailable. `app_tier_downgrade_cost` integer (int32) optional Deprecated Example: `17` The monthly cost of the proposed app in USD using the previous pricing plan tier. For example, if you propose an app that uses the Professional tier, the `app_tier_downgrade_cost` field displays the monthly cost of the app if it were to use the Basic tier. If the proposed app already uses the lest expensive tier, the field is empty. `existing_static_apps` string optional Example: `2` The maximum number of free static apps the account can have. We will charge you for any additional static apps. `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `cors` object optional `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. **Show child properties** `component` object optional The component to route to. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `match` object optional The match configuration for the rule. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `redirect` object optional The redirect configuration for the rule. Only one of `component` or `redirect` may be set. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `2` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `60` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. If not set, the health check will be performed on the component's http_port. `success_threshold` integer (int32) optional Example: `3` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `45` The number of seconds after which the check times out. `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `termination` object optional **Show child properties** `drain_seconds` integer (int32) optional Example: `15` The number of seconds to wait between selecting a container instance for termination and issuing the TERM signal. Selecting a container instance for termination begins an asynchronous drain of new requests on upstream load-balancers. (Default 15) `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. **Show child properties** `path` string optional Example: `/api` (Deprecated - Use Ingress Rules instead). An HTTP path prefix. Paths must start with / and must be unique across all components within an app. `preserve_path_prefix` boolean optional Example: `true` An optional flag to preserve the path that is forwarded to the backend service. By default, the HTTP request path will be trimmed from the left when forwarded to the component. For example, a component with `path=/api` will have requests to `/api/list` trimmed to `/list`. If this value is `true`, the path will remain `/api/list`. `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional **Show child properties** `ip` string optional Example: `10.0.0.1` `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. **Show child properties** `key` string required Example: `BASE_URL` The variable name `scope` string, one of: UNSET, RUN_TIME, BUILD_TIME, RUN_AND_BUILD_TIME optional Example: `BUILD_TIME` - RUN_TIME: Made available only at run-time - BUILD_TIME: Made available only at build-time - RUN_AND_BUILD_TIME: Made available at both build and run-time `type` string, one of: GENERAL, SECRET optional Example: `GENERAL` - GENERAL: A plain-text environment variable - SECRET: A secret encrypted environment variable `value` string optional Example: `http://example.com` The value. If the type is `SECRET`, the value will be encrypted on first submission. On following submissions, the encrypted value should be used. `git` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `repo_clone_url` string optional Example: `https://github.com/digitalocean/sample-golang.git` The clone URL of the repo. Example: `https://github.com/digitalocean/sample-golang.git` `github` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `gitlab` object optional **Show child properties** `branch` string optional Example: `main` The name of the branch to use `deploy_on_push` boolean optional Example: `true` Whether to automatically deploy new commits made to the repo `repo` string optional Example: `digitalocean/sample-golang` The name of the repo in the format owner/repo. Example: `digitalocean/sample-golang` `image` object optional **Show child properties** `deploy_on_push` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `digest` string optional Example: `sha256:795e91610e9cccb7bb80893fbabf9c808df7d52ae1f39cd1158618b4a33041ac` The image digest. Cannot be specified if tag is provided. `registry` string optional Example: `registry.hub.docker.com` The registry name. Must be left empty for the `DOCR` registry type. `registry_credentials` string optional Example: `my-dockerhub-username:dckr_pat_the_access_token` The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - "$username:$access_token" for registries of type `DOCKER_HUB`. - "$username:$access_token" for registries of type `GHCR`. `registry_type` string, one of: DOCKER_HUB, DOCR, GHCR optional Example: `DOCR` - DOCKER_HUB: The DockerHub container registry type. - DOCR: The DigitalOcean container registry type. - GHCR: The Github container registry type. `repository` string optional Example: `origin/master` The repository name. `tag` string optional Example: `latest` The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. `log_destinations` array of object optional A list of configured log forwarding destinations. **Show child properties** `datadog` object optional DataDog configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `logtail` object optional Logtail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `my_log_destination` `open_search` object optional OpenSearch configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `papertrail` object optional Papertrail configuration. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. **Show child properties** `max_instance_count` integer (uint32) optional Example: `3` The maximum amount of instances for this component. Maximum 250. Consider using a larger instance size if your application requires more than 250 instances. `metrics` object optional The metrics that the component is scaled on. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `min_instance_count` integer (uint32) optional Example: `2` The minimum amount of instances for this component. `liveness_health_check` object optional **Show child properties** `failure_threshold` integer (int32) optional Example: `18` The number of failed health checks before considered unhealthy. `http_path` string optional Example: `/health` The route path used for the HTTP health check ping. If not set, the HTTP health check will be disabled and a TCP health check used instead. `initial_delay_seconds` integer (int32) optional Example: `30` The number of seconds to wait before beginning health checks. `period_seconds` integer (int32) optional Example: `10` The number of seconds to wait between health checks. `port` integer (int64) optional Example: `80` The port on which the health check will be performed. `success_threshold` integer (int32) optional Example: `1` The number of successful health checks before considered healthy. `timeout_seconds` integer (int32) optional Example: `1` The number of seconds after which the check times out. `termination` object optional **Show child properties** `grace_period_seconds` integer (int32) optional Example: `120` The number of seconds to wait between sending a TERM signal to a container and issuing a KILL which causes immediate shutdown. (Default 120) **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app_cost": 5, "app_name_available": true, "existing_static_apps": "2", "max_free_static_apps": "3", "spec": { "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "http_port": 8080, "instance_count": 1, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List all app alerts `/v2/apps/{app_id}/alerts` List alerts associated to the app and any components. This includes configuration information about the alerts including emails, slack webhooks, and triggering events or conditions. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID ##### Request: `/v2/apps/{app_id}/alerts` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/alerts" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.list_alerts(app_id="4f6c71e2") ``` #### Responses **200** A JSON object with a alerts key. This is list of object alerts. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `alerts` array of object optional **Show child properties** `component_name` string optional Example: `backend` `emails` array of string optional Example: `["sammy@digitalocean.com"]` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional **Show child properties** `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `slack_webhooks` array of object optional **Show child properties** `channel` string optional Example: `Channel Name` `url` string optional Example: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` `spec` object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "alerts": [ { "emails": [ "sammy@digitalocean.com" ], "id": "e552e1f9-c1b0-4e6d-8777-ad6f27767306", "phase": "ACTIVE", "progress": { "steps": [ { "ended_at": "2020-07-28T18:00:00Z", "name": "alert-configure-insight-alert", "started_at": "2020-07-28T18:00:00Z", "status": "SUCCESS" } ] }, "spec": { "rule": "DEPLOYMENT_FAILED" } }, { "emails": [ "sammy@digitalocean.com" ], "id": "b58cc9d4-0702-4ffd-ab45-4c2a8d979527", "phase": "ACTIVE", "progress": { "steps": [ { "ended_at": "2020-07-28T18:00:00Z", "name": "alert-configure-insight-alert", "started_at": "2020-07-28T18:00:00Z", "status": "SUCCESS" } ] }, "spec": { "operator": "GREATER_THAN", "rule": "CPU_UTILIZATION", "value": 85, "window": "FIVE_MINUTES" } } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Update destinations for alerts `/v2/apps/{app_id}/alerts/{alert_id}/destinations` Updates the emails and slack webhook destinations for app alerts. Emails must be associated to a user with access to the app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID `alert_id` string required Example: `5a624ab5-dd58-4b39-b7dd-8b7c36e8a91d` The alert ID #### Request Body: `application/json` `emails` array of string optional Example: `["sammy@digitalocean.com"]` `slack_webhooks` array of object optional **Show child properties** `channel` string optional Example: `Channel Name` `url` string optional Example: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` ##### Request: `/v2/apps/{app_id}/alerts/{alert_id}/destinations` ### Payload Content type `application/json` ```json { "emails": [ "sammy@digitalocean.com" ], "slack_webhooks": [ { "channel": "Channel Name", "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX" } ] } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}/alerts/{alert_id}/destinations" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "emails": ["sammy@digitalocean.com"], "slack_webhooks": [ { "url": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX", "channel": "Channel Name", } ], } post_resp = client.apps.assign_alert_destinations("12345", "24556", req) ``` #### Responses **200** A JSON object with an alert key. This is an object of type alert. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `alert` object optional **Show child properties** `component_name` string optional Example: `backend` `emails` array of string optional Example: `["sammy@digitalocean.com"]` `id` string optional read-only Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` `phase` string, one of: UNKNOWN, PENDING, CONFIGURING, ACTIVE, ERROR optional Example: `ACTIVE` `progress` object optional **Show child properties** `steps` array of object optional **Show child properties** `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `slack_webhooks` array of object optional **Show child properties** `channel` string optional Example: `Channel Name` `url` string optional Example: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX` `spec` object optional **Show child properties** `disabled` boolean optional Example: `false` Is the alert disabled? `operator` string, one of: UNSPECIFIED_OPERATOR, GREATER_THAN, LESS_THAN optional Example: `GREATER_THAN` `rule` string (enum) optional Example: `CPU_UTILIZATION` `value` number (float) optional Example: `2.32` Threshold value for alert `window` string, one of: UNSPECIFIED_WINDOW, FIVE_MINUTES, TEN_MINUTES, THIRTY_MINUTES, ONE_HOUR optional Example: `FIVE_MINUTES` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "alert": { "emails": [ "sammy@digitalocean.com" ], "id": "e552e1f9-c1b0-4e6d-8777-ad6f27767306", "phase": "ACTIVE", "progress": { "steps": [ { "ended_at": "2020-07-28T18:00:00Z", "name": "alert-configure-insight-alert", "started_at": "2020-07-28T18:00:00Z", "status": "SUCCESS" } ] }, "spec": { "rule": "DEPLOYMENT_FAILED" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Rollback App `/v2/apps/{app_id}/rollback` Rollback an app to a previous deployment. A new deployment will be created to perform the rollback. The app will be pinned to the rollback deployment preventing any new deployments from being created, either manually or through Auto Deploy on Push webhooks. To resume deployments, the rollback must be either committed or reverted. It is recommended to use the Validate App Rollback endpoint to double check if the rollback is valid and if there are any warnings. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Request Body: `application/json` `deployment_id` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The ID of the deployment to rollback to. `skip_pin` boolean optional Example: `false` Whether to skip pinning the rollback deployment. If false, the rollback deployment will be pinned and any new deployments including Auto Deploy on Push hooks will be disabled until the rollback is either manually committed or reverted via the CommitAppRollback or RevertAppRollback endpoints respectively. If true, the rollback will be immediately committed and the app will remain unpinned. ##### Request: `/v2/apps/{app_id}/rollback` ### Payload Content type `application/json` ```json { "deployment_id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "skip_pin": false } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{ "deployment_id": "3aa4d20e-5527-4c00-b496-601fbd22520a" }' \ "https://api.digitalocean.com/v2/apps/{app_id}/rollback" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_resp = client.apps.create_rollback(app_id="b6bdf840") ``` #### Responses **200** A JSON object with a deployment key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Validate App Rollback `/v2/apps/{app_id}/rollback/validate` Check whether an app can be rolled back to a specific deployment. This endpoint can also be used to check if there are any warnings or validation conditions that will cause the rollback to proceed under unideal circumstances. For example, if a component must be rebuilt as part of the rollback causing it to take longer than usual. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Request Body: `application/json` `deployment_id` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` The ID of the deployment to rollback to. `skip_pin` boolean optional Example: `false` Whether to skip pinning the rollback deployment. If false, the rollback deployment will be pinned and any new deployments including Auto Deploy on Push hooks will be disabled until the rollback is either manually committed or reverted via the CommitAppRollback or RevertAppRollback endpoints respectively. If true, the rollback will be immediately committed and the app will remain unpinned. ##### Request: `/v2/apps/{app_id}/rollback/validate` ### Payload Content type `application/json` ```json { "deployment_id": "3aa4d20e-5527-4c00-b496-601fbd22520a", "skip_pin": false } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{ "deployment_id": "3aa4d20e-5527-4c00-b496-601fbd22520a" }' \ "https://api.digitalocean.com/v2/apps/{app_id}/rollback/validate" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) validate_req = {"deployment_id": "2", "skip_pin": False} validate_resp = client.apps.validate_rollback("1", validate_req) ``` #### Responses **200** A JSON object with the validation results. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `error` object optional `valid` boolean optional Indicates whether the app can be rolled back to the specified deployment. `warnings` array of object optional Contains a list of warnings that may cause the rollback to run under unideal circumstances. **Show child properties** `code` string (enum) optional Example: `exceeded_revision_limit` A code identifier that represents the failing condition. Failing conditions: - `incompatible_phase` - indicates that the deployment's phase is not suitable for rollback. - `incompatible_result` - indicates that the deployment's result is not suitable for rollback. - `exceeded_revision_limit` - indicates that the app has exceeded the rollback revision limits for its tier. - `app_pinned` - indicates that there is already a rollback in progress and the app is pinned. - `database_config_conflict` - indicates that the deployment's database config is different than the current config. - `region_conflict` - indicates that the deployment's region differs from the current app region. Warning conditions: - `static_site_requires_rebuild` - indicates that the deployment contains at least one static site that will require a rebuild. - `image_source_missing_digest` - indicates that the deployment contains at least one component with an image source that is missing a digest. `components` array of string optional Example: `["www"]` `message` string optional Example: `the deployment is past the maximum historical revision limit of 0 for the "starter" app tier` A human-readable message describing the failing condition. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "error": { "code": "incompatible_result", "message": "deployment result \"failed\" is unsuitable for rollback" }, "valid": false } ``` ```json { "valid": true } ``` ```json { "valid": true, "warnings": [ { "code": "image_source_missing_digest", "components": [ "docker-worker" ], "message": "one or more components are missing an image digest and are not guaranteed rollback to the old version." } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Commit App Rollback `/v2/apps/{app_id}/rollback/commit` Commit an app rollback. This action permanently applies the rollback and unpins the app to resume new deployments. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID ##### Request: `/v2/apps/{app_id}/rollback/commit` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/rollback/commit" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) commit_resp = client.apps.commit_rollback("1") ``` #### Responses **200** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Revert App Rollback `/v2/apps/{app_id}/rollback/revert` Revert an app rollback. This action reverts the active rollback by creating a new deployment from the latest app spec prior to the rollback and unpins the app to resume new deployments. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID ##### Request: `/v2/apps/{app_id}/rollback/revert` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{app_id}/rollback/revert" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) revert_resp = client.apps.revert_rollback("1") ``` #### Responses **200** A JSON object with a deployment key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `deployment` object optional **Show child properties** `cause` string optional Example: `commit 9a4df0b pushed to github/digitalocean/sample-golang` `cloned_from` string optional Example: `3aa4d20e-5527-4c00-b496-601fbd22520a` `created_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `functions` array of object optional **Show child properties** `name` string optional Example: `my-functions-component` `namespace` string optional Example: `ap-b2a93513-8d9b-4223-9d61-5e7272c81c32` The namespace where the functions are deployed. `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` The commit hash of the repository that was used to build this functions component. `id` string optional Example: `b6bdf840-2854-4f87-a36c-5f231c617c84` `jobs` array of object optional **Show child properties** `name` string optional Example: `migrate-db` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `phase` string (enum) optional Example: `ACTIVE` `phase_last_updated_at` string (date-time) optional Example: `0001-01-01T00:00:00Z` `progress` object optional **Show child properties** `error_steps` integer (int32) optional Example: `3` `pending_steps` integer (int32) optional Example: `2` `running_steps` integer (int32) optional Example: `2` `steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `success_steps` integer (int32) optional Example: `4` `summary_steps` array of object optional **Show child properties** `component_name` string optional Example: `component` `ended_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `message_base` string optional Example: `Building service` The base of a human-readable description of the step intended to be combined with the component name for presentation. For example: `message_base` = "Building service" `component_name` = "api" `name` string optional Example: `example_step` `reason` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `started_at` string (date-time) optional Example: `2020-11-19T20:27:18Z` `status` string, one of: UNKNOWN, PENDING, RUNNING, ERROR, SUCCESS optional Example: `SUCCESS` `steps` array of object optional `total_steps` integer (int32) optional Example: `5` `services` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `spec` object optional The desired configuration of an application. **Show child properties** `databases` array of object optional Database instances which can provide persistence to workloads within the application. **Show child properties** `cluster_name` string optional Example: `cluster_name` The name of the underlying DigitalOcean DBaaS cluster. This is required for production databases. For dev databases, if cluster_name is not set, a new cluster will be provisioned. `db_name` string optional Example: `my_db` The name of the MySQL or PostgreSQL database to configure. `db_user` string optional Example: `superuser` The name of the MySQL or PostgreSQL user to configure. `engine` string (enum) optional Example: `PG` - MYSQL: MySQL - PG: PostgreSQL - REDIS: Caching - MONGODB: MongoDB - KAFKA: Kafka - OPENSEARCH: OpenSearch - VALKEY: ValKey `name` string required Example: `prod-db` The database's name. The name must be unique across all components within the same app and cannot use capital letters. `production` boolean optional Example: `true` Whether this is a production or dev database. `version` string optional Example: `12` The version of the database engine `disable_edge_cache` boolean optional If set to `true`, the app will **not** be cached at the edge (CDN). Enable this option if you want to manage CDN configuration yourself—whether by using an external CDN provider or by handling static content and caching within your app. This setting is also recommended for apps that require real-time data or serve dynamic content, such as those using Server-Sent Events (SSE) over GET, or hosting an MCP (Model Context Protocol) Server that utilizes SSE. **Note:** This feature is not available for static site components. For more information, see [Disable CDN Cache](https://docs.digitalocean.com/products/app-platform/how-to/cache-content/index.html.md#disable-cdn-cache). `disable_email_obfuscation` boolean optional If set to `true`, email addresses in the app will not be obfuscated. This is useful for apps that require email addresses to be visible (in the HTML markup). `domains` array of object optional A set of hostnames where the application will be available. **Show child properties** `domain` string required Example: `app.example.com` The hostname for the domain `minimum_tls_version` string, one of: 1.2, 1.3 optional Example: `1.3` The minimum version of TLS a client application can use to access resources for the domain. Must be one of the following values wrapped within quotations: `"1.2"` or `"1.3"`. `type` string, one of: UNSPECIFIED, DEFAULT, PRIMARY, ALIAS optional Example: `DEFAULT` - DEFAULT: The default `.ondigitalocean.app` domain assigned to this app - PRIMARY: The primary domain for this app that is displayed as the default in the control panel, used in bindable environment variables, and any other places that reference an app's live URL. Only one domain may be set as primary. - ALIAS: A non-primary domain `wildcard` boolean optional Example: `true` Indicates whether the domain includes all sub-domains, in addition to the given domain `zone` string (hostname) optional Example: `example.com` Optional. If the domain uses DigitalOcean DNS and you would like App Platform to automatically manage it for you, set this to the name of the domain on your account. For example, If the domain you are adding is `app.domain.com`, the zone could be `domain.com`. `egress` object optional Specification for app egress configurations. **Show child properties** `type` string, one of: AUTOASSIGN, DEDICATED_IP optional Example: `AUTOASSIGN` `enhanced_threat_control_enabled` boolean optional If set to `true`, suspicious requests will go through additional security checks to help mitigate layer 7 DDoS attacks. `functions` array of object optional Workloads which expose publicly-accessible HTTP services via Functions Components. **Show child properties** `alerts` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `cors` object optional `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `api` The name. Must be unique across all components within the same app. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `ingress` object optional Specification for app ingress configurations. **Show child properties** `custom_error_page_url` string (uri) optional Example: `https://status.example.com/app-unavailable` Optional HTTPS URL of a custom error page to display when the app is unreachable. The page is shown in a full-viewport iframe. The target must allow framing: avoid `X-Frame-Options: DENY` and a restrictive `Content-Security-Policy` `frame-ancestors` that blocks the platform. If omitted, the default platform error page is used. `rules` array of object optional Rules for configuring HTTP ingress for component routes, CORS, rewrites, and redirects. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `jobs` array of object optional Pre and post deployment workloads which do not expose publicly-accessible HTTP routes. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `kind` string, one of: UNSPECIFIED, PRE_DEPLOY, POST_DEPLOY, FAILED_DEPLOY optional Example: `PRE_DEPLOY` - UNSPECIFIED: Default job type, will auto-complete to POST_DEPLOY kind. - PRE_DEPLOY: Indicates a job that runs before an app deployment. - POST_DEPLOY: Indicates a job that runs after an app deployment. - FAILED_DEPLOY: Indicates a job that runs after a component fails to deploy. `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `maintenance` object optional Specification to configure maintenance settings for the app, such as maintenance mode and archiving the app. **Show child properties** `archive` boolean optional Example: `true` Indicates whether the app should be archived. Setting this to true implies that enabled is set to true. `enabled` boolean optional Example: `true` Indicates whether maintenance mode should be enabled for the app. `offline_page_url` string optional Example: `https://example.com/offline.html` A custom offline page to display when maintenance mode is enabled or the app is archived. `name` string required Example: `web-app-01` The name of the app. Must be unique across all apps in the same account. `region` string (enum) optional Example: `nyc` The slug form of the geographical origin of the app. Default: `nearest available` `services` array of object optional Workloads which expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional `cors` object optional `health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `http_port` integer (int64) optional Example: `3000` The internal port on which this service's run command will listen. Default: 8080 If there is not an environment variable with the name `PORT`, one will be automatically added with its value set to the value of this field. `internal_ports` array of integer (int64) optional Example: `[80,443]` The ports on which this service will listen for internal traffic. `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `protocol` string, one of: HTTP, HTTP2 optional Example: `HTTP` The protocol which the service uses to serve traffic on the http_port. - `HTTP`: The app is serving the HTTP protocol. Default. - `HTTP2`: The app is serving the HTTP/2 protocol. Currently, this needs to be implemented in the service by serving HTTP/2 cleartext (h2c). `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional Content which can be rendered to static web assets. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `catchall_document` string optional Example: `index.html` The name of the document to use as the fallback for any requests to documents that are not found when serving this static site. Only 1 of `catchall_document` or `error_document` can be set. `cors` object optional `error_document` string optional Example: `error.html` The name of the error document to use when serving this static site. Default: 404.html. If no such file exists within the built assets, App Platform will supply one. `index_document` string optional Example: `main.html` The name of the index document to use when serving this static site. Default: index.html `output_dir` string optional Example: `dist/` An optional path to where the built assets will be located, relative to the build context. If not set, App Platform will automatically scan for these directory names: `_static`, `dist`, `public`, `build`. `routes` array of object optional Deprecated (Deprecated - Use Ingress Rules instead). A list of HTTP routes that should be routed to this component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `vpc` object optional read-only **Show child properties** `egress_ips` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` string optional Example: `c22d8f48-4bc4-49f5-8ca0-58e7164427ac` `workers` array of object optional Workloads which do not expose publicly-accessible HTTP services. **Show child properties** `bitbucket` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `build_command` string optional Example: `npm run build` An optional build command to run while building this component from source. `dockerfile_path` string optional Example: `path/to/Dockerfile` The path to the Dockerfile relative to the root of the repo. If set, it will be used to build this component. Otherwise, App Platform will attempt to build it using buildpacks. `environment_slug` string optional Example: `node-js` An environment slug describing the type of this app. For a full list, please refer to [the product documentation](https://docs.digitalocean.com/products/app-platform/index.html.md). `envs` array of object optional A list of environment variables made available to the component. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `git` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `github` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gitlab` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `image` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `log_destinations` array of object optional A list of configured log forwarding destinations. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `api` The name. Must be unique across all components within the same app. `run_command` string optional Example: `bin/api` An optional run command to override the component's default. `source_dir` string optional Example: `path/to/dir` An optional path to the working directory to use for the build. For Dockerfile builds, this will be used as the build context. Must be relative to the root of the repo. `instance_count` integer (int64) optional Example: `2` The amount of instances that this component should be scaled to. Default: 1. Must not be set if autoscaling is used. `instance_size_slug` string (enum, 24 values) optional Example: `apps-s-1vcpu-0.5gb` The instance size to use for this component. Default: `apps-s-1vcpu-0.5gb` `autoscaling` object optional Configuration for automatically scaling this component based on metrics. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `liveness_health_check` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `termination` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `static_sites` array of object optional **Show child properties** `name` string optional Example: `web` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` `tier_slug` string optional read-only Example: `basic` `updated_at` string (date-time) optional Example: `2020-07-28T18:00:00Z` `workers` array of object optional **Show child properties** `name` string optional Example: `queue-runner` `source_commit_hash` string optional Example: `54d4a727f457231062439895000d45437c7bb405` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "deployment": { "cause": "commit 9a4df0b pushed to github/digitalocean/sample-golang", "created_at": "2020-07-28T18:00:00Z", "id": "b6bdf840-2854-4f87-a36c-5f231c617c84", "phase": "PENDING_BUILD", "phase_last_updated_at": "0001-01-01T00:00:00Z", "progress": { "pending_steps": 6, "steps": [ { "name": "build", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Building service", "name": "web", "status": "PENDING" } ] } ] }, { "name": "deploy", "status": "PENDING", "steps": [ { "name": "initialize", "status": "PENDING" }, { "name": "components", "status": "PENDING", "steps": [ { "component_name": "web", "name": "web", "status": "PENDING", "steps": [ { "component_name": "web", "message_base": "Deploying service", "name": "deploy", "status": "PENDING" }, { "component_name": "web", "message_base": "Waiting for service", "name": "wait", "status": "PENDING" } ] } ] }, { "name": "finalize", "status": "PENDING" } ] } ], "total_steps": 6 }, "services": [ { "name": "web", "source_commit_hash": "9a4df0b8e161e323bc3cdf1dc71878080fe144fa" } ], "spec": { "disable_edge_cache": true, "disable_email_obfuscation": true, "enhanced_threat_control_enabled": true, "name": "sample-golang", "region": "ams", "services": [ { "environment_slug": "go", "github": { "branch": "branch", "repo": "digitalocean/sample-golang" }, "instance_count": 2, "instance_size_slug": "apps-s-1vcpu-0.5gb", "name": "web", "routes": [ { "path": "/" } ], "run_command": "bin/sample-golang" } ] }, "tier_slug": "basic", "updated_at": "2020-07-28T18:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve App Daily Bandwidth Metrics `/v2/apps/{app_id}/metrics/bandwidth_daily` Retrieve daily bandwidth usage metrics for a single app. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID #### Query Parameters `date` string (date-time) optional Example: `2023-01-17T00:00:00Z` Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday. ##### Request: `/v2/apps/{app_id}/metrics/bandwidth_daily` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}/metrics/bandwidth_daily" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.apps.get_metrics_bandwidth_daily(app_id="4f6c71e2") ``` #### Responses **200** A JSON object with a app_bandwidth_usage key Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app_bandwidth_usage` array of object optional A list of bandwidth usage details by app. **Show child properties** `app_id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The ID of the app. `bandwidth_bytes` string (uint64) optional Example: `513668` The used bandwidth amount in bytes. `date` string (date-time) optional Example: `2023-01-17T00:00:00Z` The date for the metrics data. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app_bandwidth_usage": [ { "app_id": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "bandwidth_bytes": "513668" } ], "date": "2023-01-17T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Retrieve Multiple Apps' Daily Bandwidth Metrics `/v2/apps/metrics/bandwidth_daily` Retrieve daily bandwidth usage metrics for multiple apps. #### Request Body: `application/json` `app_ids` array of string required Example: `["4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf","c2a93513-8d9b-4223-9d61-5e7272c81cf5"]` A list of app IDs to query bandwidth metrics for. `date` string (date-time) optional Example: `2023-01-17T00:00:00Z` Optional day to query. Only the date component of the timestamp will be considered. Default: yesterday. ##### Request: `/v2/apps/metrics/bandwidth_daily` ### Payload Content type `application/json` ```json { "app_ids": [ "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "c2a93513-8d9b-4223-9d61-5e7272c81cf5" ], "date": "2023-01-17T00:00:00Z" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/metrics/bandwidth_daily" \ -d '{ "app_ids": ["4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf"] }' ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "app_ids": [ "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "c2a93513-8d9b-4223-9d61-5e7272c81cf5", ], "date": "2023-01-17T00:00:00Z", } get_resp = client.apps.list_metrics_bandwidth_daily(body=req) ``` #### Responses **200** A JSON object with a app_bandwidth_usage key Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app_bandwidth_usage` array of object optional A list of bandwidth usage details by app. **Show child properties** `app_id` string optional Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The ID of the app. `bandwidth_bytes` string (uint64) optional Example: `513668` The used bandwidth amount in bytes. `date` string (date-time) optional Example: `2023-01-17T00:00:00Z` The date for the metrics data. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "app_bandwidth_usage": [ { "app_id": "4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf", "bandwidth_bytes": "513668" }, { "app_id": "c2a93513-8d9b-4223-9d61-5e7272c81cf5", "bandwidth_bytes": "254847" } ], "date": "2023-01-17T00:00:00Z" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve App Health `/v2/apps/{app_id}/health` Retrieve information like health status, cpu and memory utilization of app components. #### Path Parameters `app_id` string required Example: `4f6c71e2-1e90-4762-9fee-6cc4a0a9f2cf` The app ID ##### Request: `/v2/apps/{app_id}/health` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/apps/{id}/health" ``` #### Responses **200** A JSON with key app_health Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `app_health` object optional **Show child properties** `components` array of object optional **Show child properties** `cpu_usage_percent` number (double) optional Example: `30` `memory_usage_percent` number (double) optional Example: `25` `name` string optional Example: `sample_app` `replicas_desired` integer (int64) optional Example: `1` `replicas_ready` integer (int64) optional Example: `1` `state` string, one of: UNKNOWN, HEALTHY, UNHEALTHY optional Example: `HEALTHY` `functions_components` array of object optional **Show child properties** `functions_component_health_metrics` array of object optional **Show child properties** `metric_label` string optional Example: `activations_count` `metric_value` number (double) optional Example: `100` `time_window` string optional Example: `1h` `name` string optional Example: `sample_function` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "components": [ { "cpu_usage_percent": 5.555, "memory_usage_percent": 20.32, "name": "sample-expressjs", "replicas_desired": 1, "replicas_ready": 2, "state": "HEALTHY" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [App Platform Pricing](https://docs.digitalocean.com/products/app-platform/details/pricing/index.html.md), [How to Use Environment Variables in App Platform](https://docs.digitalocean.com/products/app-platform/how-to/use-environment-variables/index.html.md), [PHP Buildpack on App Platform](https://docs.digitalocean.com/products/app-platform/reference/buildpacks/php/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/batch-inference/ --- title: Batch Inference description: Batch Inference is an asynchronous processing capability designed to help you scale high-volume AI projects more efficiently. Ideal for heavy-duty … product: Reference url: https://docs.digitalocean.com/reference/api/reference/batch-inference/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Batch Inference Generated on 4 Dec 2026 Batch Inference is an asynchronous processing capability designed to help you scale high-volume AI projects more efficiently. Ideal for heavy-duty workloads like large-scale data classification, evaluations, and content enrichment, you can submit thousands or even millions of requests in a single job with a guaranteed results window of 24 hours. By utilizing off-peak GPU capacity, Batch Inference provides high-performance LLM access at a significantly reduced price point compared to standard synchronous APIs, making it a cost-effective choice for non-interactive workloads. Base URL `https://inference.do-ai.run` ## Endpoints - **POST** [Create a Batch Inference Input File](#inference_create_batch_file) - **PUT** [Upload a Batch Inference Input File](#inference_upload_batch_file) - **GET** [List Batch Inference Jobs](#inference_list_batches) - **POST** [Create a Batch Inference Job](#inference_create_batch) - **GET** [Retrieve a Batch Inference Job](#inference_get_batch) - **GET** [Get Batch Inference Results Download Links](#inference_get_batch_results) - **POST** [Cancel a Batch Inference Job](#inference_cancel_batch) ## POST Create a Batch Inference Input File `/v1/batches/files` **Authorizations: inference_bearer_auth** Http: Bearer ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Authenticate with a Bearer Authorization Header **Serverless Inference:** ``` curl -X POST -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://inference.do-ai.run/v1/chat/completions" ``` **Agent Inference:** ``` curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true" ``` **Note:** Agent Inference APIs use an `agent_access_key` (endpoint access key) instead of a DigitalOcean OAuth token. The `agent_access_key` is provided when you provision an agent endpoint and is scoped to that specific agent. It is not interchangeable with DigitalOcean OAuth tokens (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`), which are used with Serverless Inference and the control-plane API at `https://api.digitalocean.com`. Creates a file record and returns a `file_id` plus a short-lived presigned `PUT` URL (typically valid for ~15 minutes). Upload the raw JSONL bytes to `upload_url` (see `PUT /{upload_path}`) before calling `POST /v1/batches`. #### Request Body: `application/json` `file_name` string required Example: `batch_requests.jsonl` The file you plan to upload. Must end with `.jsonl` (case-insensitive) and contain one request per line in the schema expected by the target `provider`. ##### Request: `/v1/batches/files` ### Payload Content type `application/json` ```json { "file_name": "batch_requests.jsonl" } ``` ### Python ```python import json import os from pathlib import Path from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) input_path = Path("batch_requests.jsonl") requests = [ { "custom_id": "q-1", "method": "POST", "url": "/v1/chat/completions", "body": { "model": "llama3.3-70b-instruct", "messages": [ {"role": "user", "content": "One fun fact about octopuses."} ], "max_tokens": 128, }, }, { "custom_id": "q-2", "method": "POST", "url": "/v1/chat/completions", "body": { "model": "llama3.3-70b-instruct", "messages": [ {"role": "user", "content": "One fun fact about sharks."} ], "max_tokens": 128, }, }, ] input_path.write_text("\n".join(json.dumps(r) for r in requests) + "\n") uploaded = client.files.create(file=input_path, purpose="batch") print("file_id: ", uploaded.file_id) print("filename:", uploaded.filename) print("bytes: ", uploaded.bytes) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() intent, _, err := client.BatchInference.CreatePresignedUploadURL(ctx, &godo.CreateBatchFileRequest{ FileName: "batch_requests.jsonl", }) if err != nil { panic(err) } fmt.Println("file_id: ", intent.FileID) fmt.Println("upload_url:", intent.UploadURL) } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const intent = await client.files.create({ file_name: "batch_requests.jsonl", }); console.log("file_id: ", intent.file_id); console.log("upload_url:", intent.upload_url); ``` ### cURL ```bash curl -sS -X POST "https://inference.do-ai.run/v1/batches/files" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file_name": "batch_requests.jsonl" }' | jq ``` #### Responses **201** File intent created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `expires_at` string (date-time) optional Nullable Example: `2026-04-24T19:34:19Z` When `upload_url` expires. `file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` Pass this value as `file_id` when creating a batch job. `upload_url` string (uri) required Short-lived presigned `PUT` URL (typically valid for ~15 minutes). If it expires before upload, create a new file intent. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "expires_at": "2026-04-24T19:34:19Z", "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "upload_url": "https://batch-inference.nyc3.digitaloceanspaces.com/uploads/a1b2c3d4-e5f6-4789-90ab-cdef12345678.jsonl?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Expires=900\u0026X-Amz-Signature=..." } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Upload a Batch Inference Input File `/` Uploads the raw JSONL bytes to the presigned `upload_url` returned by `POST /v1/batches/files`. **The URL is dynamic — do not construct it.** Use the `upload_url` value from the previous step verbatim. Its host, path, and query parameters are part of the short-lived (~15 minute) signature and change per request; the server and path shown here are illustrative. If the URL expires before the upload completes, create a new file intent and retry. `POST /v1/batches` performs a `HEAD` check on the uploaded object and will reject the batch if this upload has not completed. Send the raw JSONL bytes verbatim. Presigned PUT URLs are signature-sensitive to request headers — prefer `application/octet-stream` or omit `Content-Type` entirely. A custom value (for example `application/jsonl`) can cause signature mismatches unless the URL was signed for that exact header. #### Request Body: `application/octet-stream` Raw JSONL bytes — one request per line. ##### Request: `/` ### Payload Content type `application/octet-stream` ``` "string" ``` ### Python ```python # Two-step upload flow: # 1. Reserve a file_id + presigned upload_url via client.batches.files.create. # 2. PUT the raw JSONL bytes to upload_url. # # The presigned URL is short-lived (~15 minutes) and signature-sensitive — # use it verbatim and prefer Content-Type application/octet-stream (or # omit the header entirely). A custom value such as application/jsonl # can break signature matching. import os from pathlib import Path import requests from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) input_path = Path("batch_requests.jsonl") # Step 1: reserve the upload slot. intent = client.batches.files.create(file_name=input_path.name) upload_url = intent["upload_url"] file_id = intent["file_id"] # Step 2: PUT the JSONL bytes to the presigned URL. with input_path.open("rb") as fh: put = requests.put( upload_url, data=fh, headers={"Content-Type": "application/octet-stream"}, timeout=60, ) put.raise_for_status() print("uploaded file_id:", file_id) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { // Two-step upload flow: // 1. Reserve a file_id + presigned upload_url via CreatePresignedUploadURL. // 2. PUT the raw JSONL bytes with UploadInputFile. client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() intent, _, err := client.BatchInference.CreatePresignedUploadURL(ctx, &godo.CreateBatchFileRequest{ FileName: "batch_requests.jsonl", }) if err != nil { panic(err) } fh, err := os.Open("batch_requests.jsonl") if err != nil { panic(err) } defer fh.Close() if _, err := client.BatchInference.UploadInputFile(ctx, intent.UploadURL, fh); err != nil { panic(err) } fmt.Println("uploaded file_id:", intent.FileID) } ``` ### JavaScript ``` // Two-step upload flow: // 1. Reserve a file_id + presigned upload_url via client.files.create. // 2. PUT the raw JSONL bytes to upload_url. // // The presigned URL is short-lived (~15 minutes) and signature-sensitive — // use it verbatim and prefer Content-Type application/octet-stream (or // omit the header entirely). A custom value such as application/jsonl // can break signature matching. import { readFile } from "node:fs/promises"; import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); // Step 1: reserve the upload slot. const intent = await client.files.create({ file_name: "batch_requests.jsonl" }); // Step 2: PUT the JSONL bytes to the presigned URL. const body = await readFile("batch_requests.jsonl"); const res = await fetch(intent.upload_url, { method: "PUT", headers: { "Content-Type": "application/octet-stream" }, body, }); if (!res.ok) { throw new Error(`Upload failed: HTTP ${res.status} ${res.statusText}`); } console.log("uploaded file_id:", intent.file_id); ``` ### cURL ``` # UPLOAD_URL is the exact upload_url returned by POST /v1/batches/files. # Use it verbatim; do not modify the host, path, or query string. # # Send the raw JSONL bytes with --data-binary so line endings and UTF-8 # are preserved. The presigned URL is signature-sensitive: prefer # application/octet-stream (or omit Content-Type entirely) — a custom # value such as application/jsonl can break signature matching unless # the URL was signed for that exact header. curl -X PUT "$UPLOAD_URL" \ -H "Content-Type: application/octet-stream" \ --data-binary "@batch_requests.jsonl" ``` #### Responses **200** Upload accepted by object storage. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** Signature mismatch or URL expired. Create a new file intent with POST /v1/batches/files and upload again. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Batch Inference Jobs `/v1/batches` Returns a cursor-paginated list of batch jobs, ordered newest first. Use `limit` to control page size and `after` to page forward using the `last_id` from the previous response. #### Query Parameters `after` string (uuid) optional Example: `7b2e9c1a-6f4d-4d9b-a0f1-5c4b7e2f8a12` Cursor for pagination. Pass the `last_id` value from the previous response to fetch the next page. Omit for the first page. `limit` integer 1 – 100 optional Example: `20` Maximum number of batches to return per page. Default: `20` `status` string (enum) optional Example: `in_progress` Optional filter restricting results to batches in the given lifecycle state. ##### Request: `/v1/batches` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.batches.list(limit=20) for b in resp.get("data") or []: print(f"{b.get('batch_id'):40} {b.get('status'):12} {b.get('created_at')}") print("has_more:", resp.get("has_more")) print("last_id: ", resp.get("last_id")) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() resp, _, err := client.BatchInference.ListJobs(ctx, &godo.ListBatchesOptions{ Limit: 20, }) if err != nil { panic(err) } for _, edge := range resp.Edges { b := edge.Node fmt.Printf("%s\t%s\t%s\n", b.BatchID, b.Status, b.CreatedAt) } fmt.Println("has_next_page:", resp.PageInfo.HasNextPage) fmt.Println("end_cursor: ", resp.PageInfo.EndCursor) } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const page = await client.batches.list({ limit: 20 }); for (const b of page.data ?? []) { console.log(`${b.batch_id}\t${b.status}\t${b.created_at}`); } console.log("has_more:", page.has_more); console.log("last_id: ", page.last_id); ``` ### cURL ```bash curl -sS -X GET "https://inference.do-ai.run/v1/batches?limit=20" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" | jq ``` #### Responses **200** Page of batch jobs. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `data` array of object required Batch jobs on this page, ordered newest first. **Show child properties** `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` Unique identifier for the batch job. `cancelled_at` string (date-time) optional Nullable Example: `2026-04-24T19:45:11Z` `completed_at` string (date-time) optional Nullable Example: `2026-04-24T20:15:30Z` `completion_window` string, one of: 24h required Example: `24h` `created_at` string (date-time) required Example: `2026-04-24T19:19:19Z` `endpoint` string optional Example: `/v1/chat/completions` Inference endpoint each request is dispatched to. `error_file_id` string (uuid) optional Nullable Error sidecar file. Null when no errors were produced. `errors` array of object optional Nullable Top-level errors that prevented the batch from completing. **Show child properties** `code` string optional Example: `invalid_input_file` `line` integer optional Nullable Example: `42` 1-based JSONL line number, if applicable. `message` string optional Example: `Line 42: missing required field 'custom_id'.` `expires_at` string (date-time) optional Nullable Example: `2026-04-25T19:19:19Z` Derived from `created_at` plus `completion_window`. `failed_at` string (date-time) optional Nullable Example: `2026-04-24T19:50:00Z` `finalizing_at` string (date-time) optional Nullable Example: `2026-04-24T20:10:42Z` `in_progress_at` string (date-time) optional Nullable Example: `2026-04-24T19:20:05Z` `input_file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` The uploaded JSONL input file. `metadata` object optional Nullable Metadata attached at creation. `output_file_id` string (uuid) optional Nullable Output JSONL file. Populated once the job completes. `provider` string, one of: openai, anthropic required Example: `openai` `request_counts` object optional Aggregate request counts. **Show child properties** `completed` integer optional Example: `0` `failed` integer optional Example: `0` `total` integer optional Example: `10000` `request_id` string optional Example: `c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11` The idempotency key supplied at creation. `status` string (enum) required Example: `in_progress` Lifecycle status. Terminal states: `completed`, `failed`, `expired`, `cancelled`. `first_id` string (uuid) optional Nullable Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` ID of the first batch on this page. Null when the page is empty. `has_more` boolean required Example: `false` Whether additional batches exist beyond this page. `last_id` string (uuid) optional Nullable Example: `7b2e9c1a-6f4d-4d9b-a0f1-5c4b7e2f8a12` ID of the last batch on this page. Pass as `after` to fetch the next page. `object` string, one of: list required Example: `list` The object type, always `list`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "data": [ { "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "cancelled_at": "2026-04-24T19:45:11Z", "completed_at": "2026-04-24T20:15:30Z", "completion_window": "24h", "created_at": "2026-04-24T19:19:19Z", "endpoint": "/v1/chat/completions", "error_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "errors": [], "expires_at": "2026-04-25T19:19:19Z", "failed_at": "2026-04-24T19:50:00Z", "finalizing_at": "2026-04-24T20:10:42Z", "in_progress_at": "2026-04-24T19:20:05Z", "input_file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "output_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "openai", "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11", "status": "in_progress" } ], "first_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "has_more": false, "last_id": "7b2e9c1a-6f4d-4d9b-a0f1-5c4b7e2f8a12", "object": "list" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Batch Inference Job `/v1/batches` Submits a batch job against a previously uploaded JSONL input file. The upload must have completed before this call; otherwise the request is rejected. Supply a unique `request_id` to make the submission idempotent — retries with the same value return the existing job. When `provider` is `openai`, the `url` on each JSONL line must match `endpoint`. #### Request Body: `application/json` `completion_window` string, one of: 24h required Example: `24h` Time window in which the job must complete. Jobs that do not finish in time transition to `expired`. `endpoint` string, one of: /v1/responses, /v1/chat/completions optional Example: `/v1/chat/completions` Inference endpoint each request is dispatched to. **Required when `provider` is `openai` and must match the `url` on every JSONL line. Must be omitted when `provider` is `anthropic`.** `file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` The `file_id` returned by `POST /v1/batches/files`. `metadata` object optional Nullable Example: `{"dataset":"prompts_v1","team":"ml-eval"}` Optional string-valued metadata to attach to the job. `provider` string, one of: openai, anthropic required Example: `openai` The inference provider whose JSONL schema the input file conforms to. `openai` follows the OpenAI Batch API input schema (`custom_id`, `method`, `url`, `body`); `anthropic` follows the Anthropic Message Batches JSONL conventions. `request_id` string required Example: `c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11` Client-supplied idempotency key. Retries with the same value return the existing job instead of creating a duplicate. ##### Request: `/v1/batches` ### Payload Content type `application/json` Example ```json { "completion_window": "24h", "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "metadata": { "dataset": "prompts_v1", "team": "ml-eval" }, "provider": "anthropic", "request_id": "2f1a7d9e-8c03-4d2c-9b7e-6f8e2b1a4c77" } ``` ```json { "completion_window": "24h", "endpoint": "/v1/chat/completions", "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "provider": "openai", "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11" } ``` ```json { "completion_window": "24h", "endpoint": "/v1/responses", "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "provider": "openai", "request_id": "9f7b9d4a-4e6c-4a27-8e35-1b0e4c5a9a12" } ``` ### Python ```python import os import uuid from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) batch = client.batches.create( file_id=os.environ["BATCH_INPUT_FILE_ID"], provider="openai", endpoint="/v1/chat/completions", completion_window="24h", request_id=str(uuid.uuid4()), ) print("batch_id:", batch.get("batch_id")) print("status: ", batch.get("status")) ``` ### Go ```go package main import ( "context" "crypto/rand" "encoding/hex" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() id := make([]byte, 16) if _, err := rand.Read(id); err != nil { panic(err) } batch, _, err := client.BatchInference.CreateJob(ctx, &godo.CreateBatchRequest{ FileID: os.Getenv("BATCH_INPUT_FILE_ID"), Provider: "openai", Endpoint: "/v1/chat/completions", CompletionWindow: "24h", RequestID: hex.EncodeToString(id), }) if err != nil { panic(err) } fmt.Println("batch_id:", batch.BatchID) fmt.Println("status: ", batch.Status) } ``` ### JavaScript ``` import { randomUUID } from "node:crypto"; import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const batch = await client.batches.create({ file_id: process.env.BATCH_INPUT_FILE_ID, provider: "openai", endpoint: "/v1/chat/completions", completion_window: "24h", request_id: randomUUID(), }); console.log("batch_id:", batch.batch_id); console.log("status: ", batch.status); ``` ### cURL ``` # OpenAI provider — endpoint required (/v1/responses or /v1/chat/completions) curl -sS -X POST "https://inference.do-ai.run/v1/batches" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "provider": "openai", "endpoint": "/v1/chat/completions", "completion_window": "24h", "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11" }' # Anthropic provider — DO NOT send endpoint curl -sS -X POST "https://inference.do-ai.run/v1/batches" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "provider": "anthropic", "completion_window": "24h", "request_id": "2f1a7d9e-8c03-4d2c-9b7e-6f8e2b1a4c77" }' ``` #### Responses **201** Batch job accepted. Poll GET /v1/batches/{batch_id} for status. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` Unique identifier for the batch job. `cancelled_at` string (date-time) optional Nullable Example: `2026-04-24T19:45:11Z` `completed_at` string (date-time) optional Nullable Example: `2026-04-24T20:15:30Z` `completion_window` string, one of: 24h required Example: `24h` `created_at` string (date-time) required Example: `2026-04-24T19:19:19Z` `endpoint` string optional Example: `/v1/chat/completions` Inference endpoint each request is dispatched to. `error_file_id` string (uuid) optional Nullable Error sidecar file. Null when no errors were produced. `errors` array of object optional Nullable Top-level errors that prevented the batch from completing. **Show child properties** `code` string optional Example: `invalid_input_file` `line` integer optional Nullable Example: `42` 1-based JSONL line number, if applicable. `message` string optional Example: `Line 42: missing required field 'custom_id'.` `expires_at` string (date-time) optional Nullable Example: `2026-04-25T19:19:19Z` Derived from `created_at` plus `completion_window`. `failed_at` string (date-time) optional Nullable Example: `2026-04-24T19:50:00Z` `finalizing_at` string (date-time) optional Nullable Example: `2026-04-24T20:10:42Z` `in_progress_at` string (date-time) optional Nullable Example: `2026-04-24T19:20:05Z` `input_file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` The uploaded JSONL input file. `metadata` object optional Nullable Metadata attached at creation. `output_file_id` string (uuid) optional Nullable Output JSONL file. Populated once the job completes. `provider` string, one of: openai, anthropic required Example: `openai` `request_counts` object optional Aggregate request counts. **Show child properties** `completed` integer optional Example: `0` `failed` integer optional Example: `0` `total` integer optional Example: `10000` `request_id` string optional Example: `c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11` The idempotency key supplied at creation. `status` string (enum) required Example: `in_progress` Lifecycle status. Terminal states: `completed`, `failed`, `expired`, `cancelled`. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "cancelled_at": "2026-04-24T19:45:11Z", "completed_at": "2026-04-24T20:15:30Z", "completion_window": "24h", "created_at": "2026-04-24T19:19:19Z", "endpoint": "/v1/chat/completions", "error_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "errors": [ { "code": "invalid_input_file", "line": 42, "message": "Line 42: missing required field 'custom_id'." } ], "expires_at": "2026-04-25T19:19:19Z", "failed_at": "2026-04-24T19:50:00Z", "finalizing_at": "2026-04-24T20:10:42Z", "in_progress_at": "2026-04-24T19:20:05Z", "input_file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "output_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "openai", "request_counts": { "completed": 0, "failed": 0, "total": 10000 }, "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11", "status": "in_progress" } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve a Batch Inference Job `/v1/batches/{batch_id}` Returns the current state of a batch job. Poll until `status` reaches a terminal value (`completed`, `failed`, `expired`, or `cancelled`). #### Path Parameters `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` The batch job identifier. ##### Request: `/v1/batches/{batch_id}` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) batch = client.batches.retrieve(os.environ["BATCH_ID"]) print("batch_id: ", batch.get("batch_id")) print("status: ", batch.get("status")) print("request_counts:", batch.get("request_counts")) print("output_file_id:", batch.get("output_file_id")) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() batch, _, err := client.BatchInference.GetJob(ctx, os.Getenv("BATCH_ID")) if err != nil { panic(err) } fmt.Println("batch_id: ", batch.BatchID) fmt.Println("status: ", batch.Status) fmt.Println("result_available:", batch.ResultAvailable) if batch.RequestCounts != nil { fmt.Printf("request_counts: %+v\n", *batch.RequestCounts) } } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const batch = await client.batches.retrieve(process.env.BATCH_ID); console.log("batch_id: ", batch.batch_id); console.log("status: ", batch.status); console.log("request_counts:", batch.request_counts); console.log("output_file_id:", batch.output_file_id); ``` ### cURL ```bash curl -sS -X GET "https://inference.do-ai.run/v1/batches/0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" ``` #### Responses **200** The batch job. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` Unique identifier for the batch job. `cancelled_at` string (date-time) optional Nullable Example: `2026-04-24T19:45:11Z` `completed_at` string (date-time) optional Nullable Example: `2026-04-24T20:15:30Z` `completion_window` string, one of: 24h required Example: `24h` `created_at` string (date-time) required Example: `2026-04-24T19:19:19Z` `endpoint` string optional Example: `/v1/chat/completions` Inference endpoint each request is dispatched to. `error_file_id` string (uuid) optional Nullable Error sidecar file. Null when no errors were produced. `errors` array of object optional Nullable Top-level errors that prevented the batch from completing. **Show child properties** `code` string optional Example: `invalid_input_file` `line` integer optional Nullable Example: `42` 1-based JSONL line number, if applicable. `message` string optional Example: `Line 42: missing required field 'custom_id'.` `expires_at` string (date-time) optional Nullable Example: `2026-04-25T19:19:19Z` Derived from `created_at` plus `completion_window`. `failed_at` string (date-time) optional Nullable Example: `2026-04-24T19:50:00Z` `finalizing_at` string (date-time) optional Nullable Example: `2026-04-24T20:10:42Z` `in_progress_at` string (date-time) optional Nullable Example: `2026-04-24T19:20:05Z` `input_file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` The uploaded JSONL input file. `metadata` object optional Nullable Metadata attached at creation. `output_file_id` string (uuid) optional Nullable Output JSONL file. Populated once the job completes. `provider` string, one of: openai, anthropic required Example: `openai` `request_counts` object optional Aggregate request counts. **Show child properties** `completed` integer optional Example: `0` `failed` integer optional Example: `0` `total` integer optional Example: `10000` `request_id` string optional Example: `c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11` The idempotency key supplied at creation. `status` string (enum) required Example: `in_progress` Lifecycle status. Terminal states: `completed`, `failed`, `expired`, `cancelled`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "cancelled_at": "2026-04-24T19:45:11Z", "completed_at": "2026-04-24T20:15:30Z", "completion_window": "24h", "created_at": "2026-04-24T19:19:19Z", "endpoint": "/v1/chat/completions", "error_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "errors": [ { "code": "invalid_input_file", "line": 42, "message": "Line 42: missing required field 'custom_id'." } ], "expires_at": "2026-04-25T19:19:19Z", "failed_at": "2026-04-24T19:50:00Z", "finalizing_at": "2026-04-24T20:10:42Z", "in_progress_at": "2026-04-24T19:20:05Z", "input_file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "output_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "openai", "request_counts": { "completed": 0, "failed": 0, "total": 10000 }, "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11", "status": "in_progress" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Batch Inference Results Download Links `/v1/batches/{batch_id}/results` Returns short-lived presigned download URLs for the output (and optional error sidecar) of a completed batch job. If results are not yet ready, the response sets `result_available: false` or returns `412 Precondition Failed`; in both cases, keep polling batch status and retry. Download the artifacts soon after fetching — the URLs are short-lived. Result files themselves are retained for up to 30 days after the job completes, after which they are deleted. #### Path Parameters `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` The batch job identifier. ##### Request: `/v1/batches/{batch_id}/results` ### Python ```python import os from pathlib import Path import requests from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) batch_id = os.environ["BATCH_ID"] links = client.batches.results.retrieve(batch_id) if not links.get("result_available"): print("results not ready yet; poll batch status and retry") raise SystemExit(0) resp = requests.get(links["output_file_url"], timeout=60) resp.raise_for_status() out = Path("batch_output.jsonl") out.write_bytes(resp.content) print("wrote:", out) print("----- preview -----") print(resp.text[:500]) ``` ### Go ```go package main import ( "context" "fmt" "io" "net/http" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() batchID := os.Getenv("BATCH_ID") batch, _, err := client.BatchInference.GetJob(ctx, batchID) if err != nil { panic(err) } if !batch.ResultAvailable { fmt.Println("results not ready yet; poll batch status and retry") os.Exit(0) } links, _, err := client.BatchInference.GetJobResult(ctx, batchID) if err != nil { panic(err) } resp, err := http.Get(links.Download.PresignedURL) if err != nil { panic(err) } defer resp.Body.Close() out, err := os.Create("batch_output.jsonl") if err != nil { panic(err) } defer out.Close() if _, err := io.Copy(out, resp.Body); err != nil { panic(err) } fmt.Println("wrote: batch_output.jsonl") fmt.Println("output_file_id:", links.OutputFileID) } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const batchId = process.env.BATCH_ID; // client.files.content resolves the result envelope and follows the // presigned URL for you, returning the raw fetch Response. const resp = await client.files.content(batchId); if (!resp.ok) { throw new Error(`results not ready: HTTP ${resp.status}`); } const body = await resp.text(); const lines = body.split("\n").filter(Boolean); console.log(`got ${lines.length} line(s); first entry:`); console.log(lines[0]); ``` ### cURL ```bash curl -sS -X GET "https://inference.do-ai.run/v1/batches/0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21/results" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" | jq ``` #### Responses **200** Presigned download URLs. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` `error_file_url` string (uri) optional Nullable Presigned URL for the error sidecar JSONL, if any. `expires_at` string (date-time) optional Nullable Example: `2026-04-24T20:19:19Z` When the presigned URLs expire. `output_file_url` string (uri) optional Nullable Presigned URL for the main results JSONL. `result_available` boolean required Example: `true` When `false`, keep polling batch status and retry later. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **412** Results are not yet available. Poll batch status and retry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "error_file_url": "string", "expires_at": "2026-04-24T20:19:19Z", "output_file_url": "https://batch-inference.nyc3.digitaloceanspaces.com/outputs/0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21.jsonl?X-Amz-Signature=...", "result_available": true } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **412** ```json { "id": "precondition_failed", "message": "Batch results are not yet available. Retry once the job has completed." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Cancel a Batch Inference Job `/v1/batches/{batch_id}/cancel` Requests cancellation of a batch job. The job transitions to `cancelling` and, once in-flight requests drain, to `cancelled`. Jobs already in a terminal state (`completed`, `failed`, `expired`, `cancelled`) cannot be cancelled and return `409 Conflict`. Cancellation is also rejected with `409 Conflict` while the job has not yet been submitted to the upstream provider — there is nothing to cancel until the provider batch id is assigned. Partial results produced before cancellation remain available via `GET /v1/batches/{batch_id}/results`. #### Path Parameters `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` The batch job identifier. ##### Request: `/v1/batches/{batch_id}/cancel` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) result = client.batches.cancel(os.environ["BATCH_ID"]) print("batch_id: ", result.get("batch_id")) print("status: ", result.get("status")) print("cancelled_at:", result.get("cancelled_at")) ``` ### Go ```go package main import ( "context" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() batch, _, err := client.BatchInference.CancelJob(ctx, os.Getenv("BATCH_ID")) if err != nil { panic(err) } fmt.Println("batch_id:", batch.BatchID) fmt.Println("status: ", batch.Status) if batch.CancelRequestedAt != nil { fmt.Println("cancel_requested_at:", *batch.CancelRequestedAt) } } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const result = await client.batches.cancel(process.env.BATCH_ID); console.log("batch_id: ", result.batch_id); console.log("status: ", result.status); console.log("cancelled_at:", result.cancelled_at); ``` ### cURL ```bash curl -sS -X POST "https://inference.do-ai.run/v1/batches/0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21/cancel" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Content-Type: application/json" | jq ``` #### Responses **200** Cancellation accepted. Returns the updated batch job. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `batch_id` string (uuid) required Example: `0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21` Unique identifier for the batch job. `cancelled_at` string (date-time) optional Nullable Example: `2026-04-24T19:45:11Z` `completed_at` string (date-time) optional Nullable Example: `2026-04-24T20:15:30Z` `completion_window` string, one of: 24h required Example: `24h` `created_at` string (date-time) required Example: `2026-04-24T19:19:19Z` `endpoint` string optional Example: `/v1/chat/completions` Inference endpoint each request is dispatched to. `error_file_id` string (uuid) optional Nullable Error sidecar file. Null when no errors were produced. `errors` array of object optional Nullable Top-level errors that prevented the batch from completing. **Show child properties** `code` string optional Example: `invalid_input_file` `line` integer optional Nullable Example: `42` 1-based JSONL line number, if applicable. `message` string optional Example: `Line 42: missing required field 'custom_id'.` `expires_at` string (date-time) optional Nullable Example: `2026-04-25T19:19:19Z` Derived from `created_at` plus `completion_window`. `failed_at` string (date-time) optional Nullable Example: `2026-04-24T19:50:00Z` `finalizing_at` string (date-time) optional Nullable Example: `2026-04-24T20:10:42Z` `in_progress_at` string (date-time) optional Nullable Example: `2026-04-24T19:20:05Z` `input_file_id` string (uuid) required Example: `a1b2c3d4-e5f6-4789-90ab-cdef12345678` The uploaded JSONL input file. `metadata` object optional Nullable Metadata attached at creation. `output_file_id` string (uuid) optional Nullable Output JSONL file. Populated once the job completes. `provider` string, one of: openai, anthropic required Example: `openai` `request_counts` object optional Aggregate request counts. **Show child properties** `completed` integer optional Example: `0` `failed` integer optional Example: `0` `total` integer optional Example: `10000` `request_id` string optional Example: `c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11` The idempotency key supplied at creation. `status` string (enum) required Example: `in_progress` Lifecycle status. Terminal states: `completed`, `failed`, `expired`, `cancelled`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The authenticated principal does not have permission to perform this action on the requested resource. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "batch_id": "0e9d1d35-3d1e-4d66-9a2f-8c7e0f6b3e21", "cancelled_at": "2026-04-24T19:45:11Z", "completed_at": "2026-04-24T20:15:30Z", "completion_window": "24h", "created_at": "2026-04-24T19:19:19Z", "endpoint": "/v1/chat/completions", "error_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "errors": [ { "code": "invalid_input_file", "line": 42, "message": "Line 42: missing required field 'custom_id'." } ], "expires_at": "2026-04-25T19:19:19Z", "failed_at": "2026-04-24T19:50:00Z", "finalizing_at": "2026-04-24T20:10:42Z", "in_progress_at": "2026-04-24T19:20:05Z", "input_file_id": "a1b2c3d4-e5f6-4789-90ab-cdef12345678", "output_file_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "provider": "openai", "request_counts": { "completed": 0, "failed": 0, "total": 10000 }, "request_id": "c7e3ad1e-20c3-4e47-9bf2-6f2a4d6a2f11", "status": "in_progress" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "You do not have permission to perform this action." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Inference Pricing](https://docs.digitalocean.com/products/inference/details/pricing/index.html.md), [Supported Models on DigitalOcean Inference](https://docs.digitalocean.com/products/inference/details/models/index.html.md), [Use Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/billing/ --- title: Billing description: The billing endpoints allow you to retrieve your account balance, invoices, billing history, insights, and prepayment information. **Balance:** By … product: Reference url: https://docs.digitalocean.com/reference/api/reference/billing/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Billing Generated on 4 Dec 2026 The billing endpoints allow you to retrieve your account balance, invoices, billing history, insights, and prepayment information. **Balance:** By sending requests to the `/v2/customers/my/balance` endpoint, you can retrieve the balance information for the requested customer account. **Prepayment:** By sending requests to the `/v2/customers/my/prepayment_config` and `/v2/customers/my/prepayment_status` endpoints, you can retrieve prepayment gate configuration and status for the requested customer account. **Invoices:** [Invoices](https://docs.digitalocean.com/platform/billing/invoices/index.html.md) are generated on the first of each month for every DigitalOcean customer. An invoice preview is generated daily, which can be accessed with the `preview` keyword in place of `$INVOICE_UUID`. To interact with invoices, you will generally send requests to the invoices endpoint at `/v2/customers/my/invoices`. **Billing History:** Billing history is a record of billing events for your account. For example, entries may include events like payments made, invoices issued, or credits granted. To interact with invoices, you will generally send requests to the invoices endpoint at `/v2/customers/my/billing_history`. **Billing Insights:** Day-over-day changes in billing resource usage based on nightly invoice items, including total amount, region, SKU, and description for a specified date range. It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for a given month as nightly invoice items do not necessarily encompass all invoicing factors for the entire month. `v2/billing/{account_urn}/insights/{start_date}/{end_date}` where account_urn is the URN of the customer account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid). The date range specified by start_date and end_date must be in YYYY-MM-DD format. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [Get Customer Balance](#balance_get) - **GET** [Get Customer Prepayment Configuration](#prepaymentConfig_get) - **GET** [Get Customer Prepayment Status](#prepaymentStatus_get) - **GET** [List Billing History](#billingHistory_list) - **GET** [List All Invoices](#invoices_list) - **GET** [Retrieve an Invoice by UUID](#invoices_get_byUUID) - **GET** [Retrieve an Invoice CSV by UUID](#invoices_get_csvByUUID) - **GET** [Retrieve an Invoice PDF by UUID](#invoices_get_pdfByUUID) - **GET** [Retrieve an Invoice Summary by UUID](#invoices_get_summaryByUUID) - **GET** [List Billing Insights](#billingInsights_list) ## GET Get Customer Balance `/v2/customers/my/balance` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: billing:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To retrieve the balances on a customer's account, send a GET request to `/v2/customers/my/balance`. ##### Request: `/v2/customers/my/balance` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/balance" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) balance = client.balance.get() ``` #### Responses **200** The response will be a JSON object that contains the following attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `account_balance` string optional Example: `12.23` Current balance of the customer's most recent billing activity. Does not reflect `month_to_date_usage`. `generated_at` string (date-time) optional Example: `2019-07-09T15:01:12Z` The time at which balances were most recently generated. `month_to_date_balance` string optional Example: `23.44` Balance as of the `generated_at` time. This value includes the `account_balance` and `month_to_date_usage`. `month_to_date_usage` string optional Example: `11.21` Amount used in the current billing period as of the `generated_at` time. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "account_balance": "12.23", "generated_at": "2019-07-09T15:01:12Z", "month_to_date_balance": "23.44", "month_to_date_usage": "11.21" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Customer Prepayment Configuration `/v2/customers/my/prepayment_config` To retrieve the prepayment configuration and current prepayment status for a customer's account, send a GET request to `/v2/customers/my/prepayment_config`. ##### Request: `/v2/customers/my/prepayment_config` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/prepayment_config" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) prepayment_config = client.prepayment_config.get() ``` #### Responses **200** The response will be a JSON object with the customer's prepayment configuration and current prepayment status. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `config` object optional **Show child properties** `created_at` string (date-time) optional Example: `2026-06-22T19:31:51Z` Time at which the prepayment configuration was created. `is_auto_prepay_enabled` boolean optional Example: `true` Whether automatic prepayment top-up is enabled. `prepay_amount` string optional Example: `50.00` Amount to charge when auto top-up triggers. Decimal dollars, e.g. `"50.00"`. `prepay_threshold` string optional Example: `10.00` Balance threshold that triggers auto top-up. Decimal dollars, e.g. `"10.00"`. `spend_limit` string optional Example: `100.00` Maximum spend allowed before the prepayment gate blocks usage. Decimal dollars, e.g. `"100.00"`. `updated_at` string (date-time) optional Example: `2026-06-25T18:40:07Z` Time at which the prepayment configuration was last updated. `status` object optional **Show child properties** `balance` string optional Example: `25.00` Current prepayment balance. Decimal dollars, e.g. `"25.00"`. `blocked` boolean optional Example: `true` Whether the prepayment gate is currently blocking usage. `eligible` boolean optional Example: `true` Whether the account is eligible for the prepayment gate experience. `is_auto_prepay_enabled` boolean optional Example: `true` Whether automatic prepayment top-up is enabled. `month_to_date_balance` string optional Example: `75.00` Current account balance including month-to-date usage. Decimal dollars, e.g. `"75.00"`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "config": { "created_at": "2026-06-22T19:31:51Z", "is_auto_prepay_enabled": true, "prepay_amount": "50.00", "prepay_threshold": "10.00", "spend_limit": "100.00", "updated_at": "2026-06-25T18:40:07Z" }, "status": { "balance": "25.00", "blocked": true, "eligible": true, "is_auto_prepay_enabled": true, "month_to_date_balance": "75.00" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Customer Prepayment Status `/v2/customers/my/prepayment_status` To retrieve the prepayment gate status and balances for a customer's account, send a GET request to `/v2/customers/my/prepayment_status`. ##### Request: `/v2/customers/my/prepayment_status` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/prepayment_status" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) prepayment_status = client.prepayment_status.get() ``` #### Responses **200** The response will be a JSON object with the customer's prepayment gate status and balances. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `status` object optional **Show child properties** `balance` string optional Example: `25.00` Current prepayment balance. Decimal dollars, e.g. `"25.00"`. `blocked` boolean optional Example: `true` Whether the prepayment gate is currently blocking usage. `eligible` boolean optional Example: `true` Whether the account is eligible for the prepayment gate experience. `is_auto_prepay_enabled` boolean optional Example: `true` Whether automatic prepayment top-up is enabled. `month_to_date_balance` string optional Example: `75.00` Current account balance including month-to-date usage. Decimal dollars, e.g. `"75.00"`. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "status": { "balance": "25.00", "blocked": true, "eligible": true, "is_auto_prepay_enabled": true, "month_to_date_balance": "75.00" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Billing History `/v2/customers/my/billing_history` To retrieve a list of all billing history entries, send a GET request to `/v2/customers/my/billing_history`. ##### Request: `/v2/customers/my/billing_history` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/billing_history" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) balance = client.billing_history.list() ``` #### Responses **200** The response will be a JSON object that contains the following attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `billing_history` array of object optional **Show child properties** `amount` string optional Example: `12.34` Amount of the billing history entry. `date` string (date-time) optional Example: `2018-06-01T08:44:38Z` Time the billing history entry occurred. `description` string optional Example: `Invoice for May 2018` Description of the billing history entry. `invoice_id` string optional Example: `123` ID of the invoice associated with the billing history entry, if applicable. `invoice_uuid` string optional Example: `example-uuid` UUID of the invoice associated with the billing history entry, if applicable. `type` string (enum) optional Example: `Invoice` Type of billing history entry. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required Information about the response itself. **Show child properties** `total` integer optional Example: `1` Number of objects returned by the request. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "billing_history": [ { "amount": "12.34", "date": "2018-06-01T08:44:38Z", "description": "Invoice for May 2018", "invoice_id": "123", "invoice_uuid": "example-uuid", "type": "Invoice" }, { "amount": "-12.34", "date": "2018-06-02T08:44:38Z", "description": "Payment (MC 2018)", "type": "Payment" } ], "links": { "pages": { "last": "https://api.digitalocean.com/v2/customers/my/billing_history?page=3\u0026per_page=2", "next": "https://api.digitalocean.com/v2/customers/my/billing_history?page=2\u0026per_page=2" } }, "meta": { "total": 5 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Invoices `/v2/customers/my/invoices` To retrieve a list of all invoices, send a GET request to `/v2/customers/my/invoices`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/customers/my/invoices` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/invoices" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) balance = client.invoices.list() ``` #### Responses **200** The response will be a JSON object contains that contains a list of invoices under the invoices key, and the invoice preview under the invoice_preview key. Each element contains the invoice summary attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `invoice_preview` object optional The invoice preview. **Show child properties** `amount` string optional Example: `23.45` Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. `invoice_id` string optional Example: `123456789` ID of the invoice. Listed on the face of the invoice PDF as the "Invoice number". `invoice_period` string optional Example: `2020-01` Billing period of usage for which the invoice is issued, in `YYYY-MM` format. `invoice_uuid` string optional Example: `fdabb512-6faf-443c-ba2e-665452332a9e` The UUID of the invoice. The canonical reference for the invoice. `updated_at` string optional Example: `2020-01-23T06:31:50Z` Time the invoice was last updated. This is only included with the invoice preview. `invoices` array of object optional **Show child properties** `amount` string optional Example: `23.45` Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. `invoice_id` string optional Example: `123456789` ID of the invoice. Listed on the face of the invoice PDF as the "Invoice number". `invoice_period` string optional Example: `2020-01` Billing period of usage for which the invoice is issued, in `YYYY-MM` format. `invoice_uuid` string optional Example: `fdabb512-6faf-443c-ba2e-665452332a9e` The UUID of the invoice. The canonical reference for the invoice. `updated_at` string optional Example: `2020-01-23T06:31:50Z` Time the invoice was last updated. This is only included with the invoice preview. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "invoice_preview": { "amount": "34.56", "invoice_id": "34567890", "invoice_period": "2020-02", "invoice_uuid": "1afe95e6-0958-4eb0-8d9a-9c5060d3ef03", "updated_at": "2020-02-23T06:31:50Z" }, "invoices": [ { "amount": "12.34", "invoice_id": "12345678", "invoice_period": "2019-12", "invoice_uuid": "22737513-0ea7-4206-8ceb-98a575af7681" }, { "amount": "23.45", "invoice_id": "23456789", "invoice_period": "2019-11", "invoice_uuid": "fdabb512-6faf-443c-ba2e-665452332a9e" } ], "links": { "pages": { "last": "https://api.digitalocean.com/v2/customers/my/invoices?page=35\u0026per_page=2", "next": "https://api.digitalocean.com/v2/customers/my/invoices?page=2\u0026per_page=2" } }, "meta": { "total": 70 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Invoice by UUID `/v2/customers/my/invoices/{invoice_uuid}` To retrieve the invoice items for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID`. #### Path Parameters `invoice_uuid` string required Example: `22737513-0ea7-4206-8ceb-98a575af7681` UUID of the invoice #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/customers/my/invoices/{invoice_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) invoices = client.invoices.get_by_uuid(invoice_uuid=1) ``` #### Responses **200** The response will be a JSON object with a key called invoice_items. This will be set to an array of invoice item objects. All resources will be shown on invoices, regardless of permissions. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `invoice_items` array of object optional **Show child properties** `amount` string optional Example: `12.34` Billed amount of this invoice item. Billed in USD. `description` string optional Example: `a56e086a317d8410c8b4cfd1f4dc9f82` Description of the invoice item. `duration` string optional Example: `744` Duration of time this invoice item was used and subsequently billed. `duration_unit` string optional Example: `Hours` Unit of time for duration. `end_time` string optional Example: `2020-02-01T00:00:00Z` Time the invoice item stopped being billed for usage. `group_description` string optional Example: `my-doks-cluster` Description of the invoice item when it is a grouped set of usage, such as DOKS or databases. `product` string optional Example: `Kubernetes Clusters` Name of the product being billed in the invoice item. `project_name` string optional Example: `web` Name of the DigitalOcean Project this resource belongs to. `resource_id` string optional Example: `2353624` ID of the resource billing in the invoice item if available. `resource_uuid` string optional Example: `711157cb-37c8-4817-b371-44fa3504a39c` UUID of the resource billing in the invoice item if available. `start_time` string optional Example: `2020-01-01T00:00:00Z` Time the invoice item began to be billed for usage. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "invoice_items": [ { "amount": "12.34", "description": "a56e086a317d8410c8b4cfd1f4dc9f82", "duration": "744", "duration_unit": "Hours", "end_time": "2020-02-01T00:00:00Z", "group_description": "my-doks-cluster", "product": "Kubernetes Clusters", "resource_uuid": "711157cb-37c8-4817-b371-44fa3504a39c", "start_time": "2020-01-01T00:00:00Z" }, { "amount": "34.45", "description": "Spaces ($5/mo 250GB storage \u0026 1TB bandwidth)", "duration": "744", "duration_unit": "Hours", "end_time": "2020-02-01T00:00:00Z", "product": "Spaces Subscription", "start_time": "2020-01-01T00:00:00Z" } ], "links": { "pages": { "last": "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=3\u0026per_page=2", "next": "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681?page=2\u0026per_page=2" } }, "meta": { "total": 6 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Invoice CSV by UUID `/v2/customers/my/invoices/{invoice_uuid}/csv` To retrieve a CSV for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/csv`. #### Path Parameters `invoice_uuid` string required Example: `22737513-0ea7-4206-8ceb-98a575af7681` UUID of the invoice ##### Request: `/v2/customers/my/invoices/{invoice_uuid}/csv` ### cURL ```bash curl -X GET \ -H "Content-Type: text/csv" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/csv" --output invoice.csv ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) invoices = client.invoices.get_csv_by_uuid(invoice_uuid=1) ``` #### Responses **200** The response will be a CSV file. Response Headers `content-disposition` string Indicates if the content is expected to be displayed *inline* in the browser, that is, as a Web page or as part of a Web page, or as an *attachment*, that is downloaded and saved locally. `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ``` product,group_description,description,hours,start,end,USD,project_name,category Floating IPs,,Unused Floating IP - 1.1.1.1,100,2020-07-01 00:00:00 +0000,2020-07-22 18:14:39 +0000,$3.11,,iaas Taxes,,STATE SALES TAX (6.25%),,2020-07-01 00:00:00 +0000,2020-07-31 23:59:59 +0000,$0.16,,iaas ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Invoice PDF by UUID `/v2/customers/my/invoices/{invoice_uuid}/pdf` To retrieve a PDF for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/pdf`. #### Path Parameters `invoice_uuid` string required Example: `22737513-0ea7-4206-8ceb-98a575af7681` UUID of the invoice ##### Request: `/v2/customers/my/invoices/{invoice_uuid}/pdf` ### cURL ```bash curl -X GET \ -H "Content-Type: application/pdf" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/pdf" --output invoice.pdf ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) invoices = client.invoices.get_pdf_by_uuid(invoice_uuid=1) ``` #### Responses **200** The response will be a PDF file. Response Headers `content-disposition` string Indicates if the content is expected to be displayed *inline* in the browser, that is, as a Web page or as part of a Web page, or as an *attachment*, that is downloaded and saved locally. `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Invoice Summary by UUID `/v2/customers/my/invoices/{invoice_uuid}/summary` To retrieve a summary for an invoice, send a GET request to `/v2/customers/my/invoices/$INVOICE_UUID/summary`. #### Path Parameters `invoice_uuid` string required Example: `22737513-0ea7-4206-8ceb-98a575af7681` UUID of the invoice ##### Request: `/v2/customers/my/invoices/{invoice_uuid}/summary` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/customers/my/invoices/22737513-0ea7-4206-8ceb-98a575af7681/summary" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) invoice = client.invoices.get_summary_by_uuid(invoice_uuid="1") ``` #### Responses **200** To retrieve a summary for an invoice, send a GET request to /v2/customers/my/invoices/$INVOICE_UUID/summary. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `amount` string optional Example: `27.13` Total amount of the invoice, in USD. This will reflect month-to-date usage in the invoice preview. `billing_period` string optional Example: `2020-01` Billing period of usage for which the invoice is issued, in `YYYY-MM` format. `credits_and_adjustments` object optional `invoice_id` string optional Example: `123456789` ID of the invoice `invoice_uuid` string optional Example: `22737513-0ea7-4206-8ceb-98a575af7681` UUID of the invoice `overages` object optional `product_charges` object optional `taxes` object optional `user_billing_address` object optional `user_company` string optional Example: `DigitalOcean` Company of the DigitalOcean customer being invoiced, if set. `user_email` string optional Example: `sammy@digitalocean.com` Email of the DigitalOcean customer being invoiced. `user_name` string optional Example: `Sammy Shark` Name of the DigitalOcean customer being invoiced. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "amount": "27.13", "billing_period": "2020-01", "credits_and_adjustments": { "amount": "6.78", "name": "Credits \u0026 adjustments" }, "invoice_id": "123456789", "invoice_uuid": "22737513-0ea7-4206-8ceb-98a575af7681", "overages": { "amount": "3.45", "name": "Overages" }, "product_charges": { "amount": "12.34", "items": [ { "amount": "10.00", "count": "1", "name": "Spaces Subscription" }, { "amount": "2.34", "count": "1", "name": "Database Clusters" } ], "name": "Product usage charges" }, "taxes": { "amount": "4.56", "name": "Taxes" }, "user_billing_address": { "address_line1": "101 Shark Row", "city": "Atlantis", "country_iso2_code": "US", "created_at": "2019-09-03T16:34:46.000+00:00", "postal_code": "12345", "region": "OC", "updated_at": "2019-09-03T16:34:46.000+00:00" }, "user_company": "DigitalOcean", "user_email": "sammy@digitalocean.com", "user_name": "Sammy Shark" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Billing Insights `/v2/billing/{account_urn}/insights/{start_date}/{end_date}` This endpoint returns day-over-day changes in billing resource usage based on nightly invoice items, including total amount, region, SKU, and description for a specified date range. It is important to note that the daily resource usage may not reflect month-end billing totals when totaled for a given month as nightly invoice item estimates do not necessarily encompass all invoicing factors for the entire month. #### Path Parameters `account_urn` string required Example: `do:team:12345678-1234-1234-1234-123456789012` URN of the customer account, can be a team (do:team:uuid) or an organization (do:teamgroup:uuid) `start_date` string (date) required Example: `2025-01-01` Start date for billing insights in YYYY-MM-DD format `end_date` string (date) required Example: `2025-01-31` End date for billing insights in YYYY-MM-DD format. Must be within 31 days of start_date #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/billing/{account_urn}/insights/{start_date}/{end_date}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/billing/do:team:12345678-1234-1234-1234-123456789012/insights/2025-01-01/2025-01-31?per_page=20&page=1" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) insights = client.billing.list_insights( account_urn="do:team:12345678-1234-1234-1234-123456789012", start_date="2025-01-01", end_date="2025-01-31", per_page=100, page=1 ) ``` #### Responses **200** The response will be a JSON object that contains a list of billing data points under the data_points key, along with pagination metadata including total_items, total_pages, and current_page. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `current_page` integer required Example: `1` Current page number `data_points` array of object required Array of billing data points, which are day-over-day changes in billing resource usage based on nightly invoice item estimates, for the requested period **Show child properties** `description` string optional Example: `droplet name (c-2-4GiB)` Description of the billed resource or service as shown on an invoice item `group_description` string optional Example: `kubernetes cluster name` Optional invoice item group name of the billed resource or service, blank when not part an invoice item group `region` string optional Example: `nyc3` Region where the usage occurred `sku` string optional Example: `1-DO-DROP-0109` Unique SKU identifier for the billed resource `start_date` string (date) optional Example: `2025-01-15` Start date of the billing data point in YYYY-MM-DD format `total_amount` string optional Example: `12.45` Total amount for this data point in USD `usage_team_urn` string optional Example: `do:team:12345678-1234-1234-1234-123456789012` URN of the team that incurred the usage `total_items` integer required Example: `250` Total number of items available across all pages `total_pages` integer required Example: `3` Total number of pages available **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "current_page": 1, "data_points": [ { "description": "droplet name (c-2-4GiB)", "group_description": "", "region": "nyc3", "sku": "1-DO-DROP-0109", "start_date": "2025-01-01", "total_amount": "0.86", "usage_team_urn": "do:team:12345678-1234-1234-1234-123456789012" }, { "description": "3 nodes - 4 GB / 2 vCPU / 80 GB SSD", "group_description": "kubernetes cluster name", "region": "nyc3", "sku": "1-KS-K8SWN-00109", "start_date": "2025-01-01", "total_amount": "2.57", "usage_team_urn": "do:team:12345678-1234-1234-1234-123456789012" } ], "total_items": 2, "total_pages": 1 } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/block-storage-actions/ --- title: Block Storage Actions description: Block storage actions are commands that can be given to a DigitalOcean Block Storage Volume. An example would be detaching or attaching a volume from … product: Reference url: https://docs.digitalocean.com/reference/api/reference/block-storage-actions/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Block Storage Actions Generated on 4 Dec 2026 Block storage actions are commands that can be given to a DigitalOcean Block Storage Volume. An example would be detaching or attaching a volume from a Droplet. These requests are made on the `/v2/volumes/$VOLUME_ID/actions` endpoint. An action object is returned. These objects hold the current status of the requested action. Base URL `https://api.digitalocean.com` ## Endpoints - **POST** [Initiate A Block Storage Action By Volume Name](#volumeActions_post) - **GET** [List All Actions for a Volume](#volumeActions_list) - **POST** [Initiate A Block Storage Action By Volume Id](#volumeActions_post_byId) - **GET** [Retrieve an Existing Volume Action](#volumeActions_get) ## POST Initiate A Block Storage Action By Volume Name `/v2/volumes/actions` **Authorizations: bearer_auth (2 scopes)** Http: Bearer Required scopes: block_storage_action:create api:write ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To initiate an action on a block storage volume by Name, send a POST request to `~/v2/volumes/actions`. The body should contain the appropriate attributes for the respective action. ## Attach a Block Storage Volume to a Droplet | Attribute | Details | |---|---| | type | This must be `attach` | | volume_name | The name of the block storage volume | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | Each volume may only be attached to a single Droplet. However, up to fifteen volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, [additional configuration](https://docs.digitalocean.com/products/volumes/how-to/mount/index.html.md) is required. ## Remove a Block Storage Volume from a Droplet | Attribute | Details | |---|---| | type | This must be `detach` | | volume_name | The name of the block storage volume | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` #### Request Body: `application/json` **attach** `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource will initially be available. `type` string, one of: attach, detach, resize required Example: `attach` The volume action to initiate. `droplet_id` integer required Example: `11612190` The unique identifier for the Droplet the volume will be attached or detached from. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. Requires `tag:create` scope. **detach** `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource will initially be available. `type` string, one of: attach, detach, resize required Example: `attach` The volume action to initiate. `droplet_id` integer required Example: `11612190` The unique identifier for the Droplet the volume will be attached or detached from. ##### Request: `/v2/volumes/actions` ### Payload Content type `application/json` Example ```json { "droplet_id": 11612190, "region": "nyc1", "tags": [ "aninterestingtag" ], "type": "attach", "volume_name": "example" } ``` ```json { "droplet_id": 11612190, "region": "nyc1", "type": "detach", "volume_name": "example" } ``` ### cURL ``` # Attach a volume to a Droplet by name curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type": "attach", "volume_name": "example", "region": "nyc1", "droplet_id": "11612190","tags":["aninterestingtag"] }' \ "https://api.digitalocean.com/v2/volumes/actions" # Remove a volume from a Droplet by name curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type": "detach", "droplet_id": "11612190", "volume_name": "example", "region": "nyc1"}' \ "https://api.digitalocean.com/v2/volumes/actions" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "attach", "volume_name": "example", "droplet_id": 11612190, "region": "nyc1", "tags": [ "aninterestingtag" ] } resp = client.volume_actions.post(body=req) ``` #### Responses **202** The response will be an object with a key called action. The value of this will be an object that contains the standard volume action attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** Example ```json { "action": { "completed_at": null, "id": 68212773, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_id": null, "resource_type": "backend", "started_at": "2015-10-15T17:46:15Z", "status": "in-progress", "type": "detach_volume" } } ``` ```json { "action": { "completed_at": "2020-11-12T17:51:14Z", "id": 72531856, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_type": "volume", "started_at": "2020-11-12T17:51:03Z", "status": "completed", "type": "attach_volume" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Actions for a Volume `/v2/volumes/{volume_id}/actions` To retrieve all actions that have been executed on a volume, send a GET request to `/v2/volumes/$VOLUME_ID/actions`. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/volumes/{volume_id}/actions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } actions, _, err := client.StorageActions(ctx, "7724db7c-e098-11e5-b522-000f53304e51", opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) actions = client.volume.actions(id: '7724db7c-e098-11e5-b522-000f53304e51') actions.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volume_actions.list(volume_id="7724db7c") ``` #### Responses **200** The response will be an object with a key called action. The value of this will be an object that contains the standard volume action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `actions` array of object optional **Show child properties** `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "actions": [ { "completed_at": "2020-11-21T21:51:09Z", "id": 72531856, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_type": "volume", "started_at": "2020-11-21T21:51:09Z", "status": "completed", "type": "attach_volume" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Initiate A Block Storage Action By Volume Id `/v2/volumes/{volume_id}/actions` To initiate an action on a block storage volume by Id, send a POST request to `~/v2/volumes/$VOLUME_ID/actions`. The body should contain the appropriate attributes for the respective action. ## Attach a Block Storage Volume to a Droplet | Attribute | Details | |---|---| | type | This must be `attach` | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | Each volume may only be attached to a single Droplet. However, up to fifteen volumes may be attached to a Droplet at a time. Pre-formatted volumes will be automatically mounted to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018 when attached. On older Droplets, [additional configuration](https://docs.digitalocean.com/products/volumes/how-to/mount/index.html.md) is required. ## Remove a Block Storage Volume from a Droplet | Attribute | Details | |---|---| | type | This must be `detach` | | droplet_id | Set to the Droplet's ID | | region | Set to the slug representing the region where the volume is located | ## Resize a Volume | Attribute | Details | |---|---| | type | This must be `resize` | | size_gigabytes | The new size of the block storage volume in GiB (1024^3) | | region | Set to the slug representing the region where the volume is located | Volumes may only be resized upwards. The maximum size for a volume is 16TiB. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` #### Request Body: `application/json` **attach** `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource will initially be available. `type` string, one of: attach, detach, resize required Example: `attach` The volume action to initiate. `droplet_id` integer required Example: `11612190` The unique identifier for the Droplet the volume will be attached or detached from. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. Requires `tag:create` scope. **detach** `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource will initially be available. `type` string, one of: attach, detach, resize required Example: `attach` The volume action to initiate. `droplet_id` integer required Example: `11612190` The unique identifier for the Droplet the volume will be attached or detached from. **resize** `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource will initially be available. `type` string, one of: attach, detach, resize required Example: `attach` The volume action to initiate. `size_gigabytes` integer required The new size of the block storage volume in GiB (1024^3). ##### Request: `/v2/volumes/{volume_id}/actions` ### Payload Content type `application/json` Example ```json { "droplet_id": 11612190, "region": "nyc1", "tags": [ "aninterestingtag" ], "type": "attach" } ``` ```json { "droplet_id": 11612190, "region": "nyc1", "type": "detach" } ``` ```json { "region": "nyc1", "size_gigabytes": 100, "type": "resize" } ``` ### cURL ``` # Attach a Volume to a Droplet by ID curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type": "attach", "droplet_id": 11612190, "region": "nyc1", "tags":["aninterestingtag"]}' \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions" # Remove a Volume from a Droplet by ID curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type": "detach", "droplet_id": "11612190", "region": "nyc1"}' \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions" # Resize a Volume curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"resize","size_gigabytes": 100, "region":"nyc1"}' \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() // Attach a Volume to a Droplet by ID action, _, err := client.StorageActions.Attach(ctx, "7724db7c-e098-11e5-b522-000f53304e51", 11612190) // Remove a Volume from a Droplet by ID // action, _, err := client.StorageActions.Detach(ctx, "7724db7c-e098-11e5-b522-000f53304e51") // Resize a Volume // action, _, err := client.StorageActions.Resize(ctx, "7724db7c-e098-11e5-b522-000f53304e51", 100, "nyc1") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) # Attach a Volume to a Droplet by ID client.volume_actions.attach(volume_id:'7724db7c-e098-11e5-b522-000f53304e51', droplet_id: 11612190, region: 'nyc1' # Remove a Volume from a Droplet by ID # client.volume_actions.detach(volume_id:'7724db7c-e098-11e5-b522-000f53304e51', droplet_id: 11612190, region: 'nyc1' ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "attach", "droplet_id": 11612190, "region": "nyc1", "tags": [ "aninterestingtag" ] } resp = client.volume_actions.post_by_id(volume_id="7724db7c", body=req) ``` #### Responses **202** The response will be an object with a key called action. The value of this will be an object that contains the standard volume action attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** Example ```json { "action": { "completed_at": null, "id": 68212773, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_id": null, "resource_type": "backend", "started_at": "2015-10-15T17:46:15Z", "status": "in-progress", "type": "detach_volume" } } ``` ```json { "action": { "completed_at": "2020-11-12T17:51:14Z", "id": 72531856, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_type": "volume", "started_at": "2020-11-12T17:51:03Z", "status": "completed", "type": "attach_volume" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Volume Action `/v2/volumes/{volume_id}/actions/{action_id}` To retrieve the status of a volume action, send a GET request to `/v2/volumes/$VOLUME_ID/actions/$ACTION_ID`. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. `action_id` integer >= 1 required Example: `36804636` A unique numeric ID that can be used to identify and reference an action. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/volumes/{volume_id}/actions/{action_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51/actions/72531856" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() action, _, err := client.StorageActions.Get(ctx, "7724db7c-e098-11e5-b522-000f53304e51", 72531856) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.volume.actions.find(volume_id: '7724db7c-e098-11e5-b522-000f53304e51', id: 72531856) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volume_actions.get(volume_id="7724db7c") ``` #### Responses **200** The response will be an object with a key called action. The value of this will be an object that contains the standard volume action attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "action": { "completed_at": null, "id": 68212773, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_id": null, "resource_type": "backend", "started_at": "2015-10-15T17:46:15Z", "status": "in-progress", "type": "detach_volume" } } ``` ```json { "action": { "completed_at": "2020-11-12T17:51:14Z", "id": 72531856, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "region_slug": "nyc1", "resource_type": "volume", "started_at": "2020-11-12T17:51:03Z", "status": "completed", "type": "attach_volume" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Increase the Size of DigitalOcean Volumes Block Storage](https://docs.digitalocean.com/products/volumes/how-to/increase-size/index.html.md), [How to Mount and Unmount Volumes](https://docs.digitalocean.com/products/volumes/how-to/mount-unmount/index.html.md), [Volume Pricing](https://docs.digitalocean.com/products/volumes/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/block-storage/ --- title: Block Storage description: '[DigitalOcean Block Storage Volumes](https://docs.digitalocean.com/products/volumes/) provide expanded storage capacity for your Droplets and can be …' product: Reference url: https://docs.digitalocean.com/reference/api/reference/block-storage/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Block Storage Generated on 4 Dec 2026 [DigitalOcean Block Storage Volumes](https://docs.digitalocean.com/products/volumes/index.html.md) provide expanded storage capacity for your Droplets and can be moved between Droplets within a specific region. Volumes function as raw block devices, meaning they appear to the operating system as locally attached storage which can be formatted using any file system supported by the OS. They may be created in sizes from 1GiB to 16TiB. By sending requests to the `/v2/volumes` endpoint, you can list, create, or delete volumes as well as attach and detach them from Droplets Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Block Storage Volumes](#volumes_list) - **POST** [Create a New Block Storage Volume](#volumes_create) - **DELETE** [Delete a Block Storage Volume by Name](#volumes_delete_byName) - **GET** [Retrieve an Existing Volume Snapshot](#volumeSnapshots_get_byId) - **DELETE** [Delete a Volume Snapshot](#volumeSnapshots_delete_byId) - **GET** [Retrieve an Existing Block Storage Volume](#volumes_get) - **DELETE** [Delete a Block Storage Volume](#volumes_delete) - **GET** [List Snapshots for a Volume](#volumeSnapshots_list) - **POST** [Create Snapshot from a Volume](#volumeSnapshots_create) ## GET List All Block Storage Volumes `/v2/volumes` **Authorizations: bearer_auth (3 scopes)** Http: Bearer Required scopes: api:read api:write block_storage:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the block storage volumes available on your account, send a GET request to `/v2/volumes`. ## Filtering Results ### By Region The `region` may be provided as query parameter in order to restrict results to volumes available in a specific region. For example: `/v2/volumes?region=nyc1` ### By Name It is also possible to list volumes on your account that match a specified name. To do so, send a GET request with the volume's name as a query parameter to `/v2/volumes?name=$VOLUME_NAME`. **Note:** You can only create one volume per region with the same name. ### By Name and Region It is also possible to retrieve information about a block storage volume by name. To do so, send a GET request with the volume's name and the region slug for the region it is located in as query parameters to `/v2/volumes?name=$VOLUME_NAME®ion=nyc1`. #### Query Parameters `name` string optional Example: `example` The block storage volume's name. `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource is available. `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/volumes` ### cURL ``` # List all volumes curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes?region=nyc1" # List volumes filtered by name curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes?name=example" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } volumes, _, err := client.Storage.ListVolumes(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) volumes = client.volumes.all volumes.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volumes.list(region="nyc3") ``` #### Responses **200** The response will be a JSON object with a key called volumes. This will be set to an array of volume objects, each of which will contain the standard volume attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `volumes` array of object required Array of volumes. **Show child properties** `created_at` string optional read-only Example: `2020-03-02T17:00:49Z` A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. `description` string optional Example: `Block store for examples` An optional free-form text field to describe a block storage volume. `droplet_ids` array of integer optional read-only Nullable Example: `[]` An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. `id` string optional read-only Example: `506f78a4-e098-11e5-ad9f-000f53306ae1` The unique identifier for the block storage volume. `name` string optional Example: `example` A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. `size_gigabytes` integer optional Example: `10` The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings applied to the resource. Requires `tag:read` scope. `filesystem_label` string optional Example: `example` The label currently applied to the filesystem. `filesystem_type` string optional Example: `ext4` The type of filesystem currently in-use on the volume. `region` object optional read-only `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "links": {}, "meta": { "total": 2 }, "volumes": [ { "created_at": "2016-03-02T17:00:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53306ae1", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "size_gigabytes": 10, "tags": [ "aninterestingtag" ] }, { "created_at": "2016-03-02T17:01:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53305eb2", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc3" }, "size_gigabytes": 10, "tags": [ "aninterestingtag" ] } ] } ``` ```json { "links": {}, "meta": { "total": 1 }, "volumes": [ { "created_at": "2016-03-02T17:00:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53306ae1", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "size_gigabytes": 10, "tags": [ "aninterestingtag" ] } ] } ``` ```json { "links": {}, "meta": { "total": 1 }, "volumes": [ { "created_at": "2016-03-02T17:00:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53306ae1", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "size_gigabytes": 10, "tags": [ "aninterestingtag" ] } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Block Storage Volume `/v2/volumes` To create a new volume, send a POST request to `/v2/volumes`. Optionally, a `filesystem_type` attribute may be provided in order to automatically format the volume's filesystem. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to Droplets without support for auto-mounting is not recommended. #### Request Body: `application/json` **Volumes Ext4** `created_at` string optional read-only Example: `2020-03-02T17:00:49Z` A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. `description` string optional Example: `Block store for examples` An optional free-form text field to describe a block storage volume. `droplet_ids` array of integer optional read-only Nullable Example: `[]` An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. `id` string optional read-only Example: `506f78a4-e098-11e5-ad9f-000f53306ae1` The unique identifier for the block storage volume. `name` string optional Example: `example` A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. `size_gigabytes` integer optional Example: `10` The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. Requires `tag:create` scope. `snapshot_id` string optional Example: `b0798135-fb76-11eb-946a-0a58ac146f33` The unique identifier for the volume snapshot from which to create the volume. `filesystem_type` string optional Example: `ext4` The name of the filesystem type to be used on the volume. When provided, the volume will automatically be formatted to the specified filesystem type. Currently, the available options are `ext4` and `xfs`. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to other Droplets is not recommended. `filesystem_label` object optional `region` string (enum) required Example: `nyc3` The slug identifier for the region where the resource will initially be available. **Volumes Xfs** `created_at` string optional read-only Example: `2020-03-02T17:00:49Z` A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. `description` string optional Example: `Block store for examples` An optional free-form text field to describe a block storage volume. `droplet_ids` array of integer optional read-only Nullable Example: `[]` An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. `id` string optional read-only Example: `506f78a4-e098-11e5-ad9f-000f53306ae1` The unique identifier for the block storage volume. `name` string optional Example: `example` A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. `size_gigabytes` integer optional Example: `10` The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. Requires `tag:create` scope. `snapshot_id` string optional Example: `b0798135-fb76-11eb-946a-0a58ac146f33` The unique identifier for the volume snapshot from which to create the volume. `filesystem_type` string optional Example: `ext4` The name of the filesystem type to be used on the volume. When provided, the volume will automatically be formatted to the specified filesystem type. Currently, the available options are `ext4` and `xfs`. Pre-formatted volumes are automatically mounted when attached to Ubuntu, Debian, Fedora, Fedora Atomic, and CentOS Droplets created on or after April 26, 2018. Attaching pre-formatted volumes to other Droplets is not recommended. `filesystem_label` object optional `region` string (enum) required Example: `nyc3` The slug identifier for the region where the resource will initially be available. ##### Request: `/v2/volumes` ### Payload Content type `application/json` Example ```json { "description": "A new volume based on a snapshot", "filesystem_label": "ext4_volume_01", "filesystem_type": "ext4", "name": "snapshot_example", "region": "nyc1", "size_gigabytes": 10, "snapshot_id": "b0798135-fb76-11eb-946a-0a58ac146f33" } ``` ```json { "description": "Block store for examples", "filesystem_label": "ext4_volume_01", "filesystem_type": "ext4", "name": "ext4-example", "region": "nyc1", "size_gigabytes": 10 } ``` ```json { "description": "Block store for examples", "filesystem_label": "xfs_volume01", "filesystem_type": "xfs", "name": "xfs_example", "region": "nyc1", "size_gigabytes": 10 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"size_gigabytes":10, "name": "example", "description": "Block store for examples", "region": "nyc1", "filesystem_type": "ext4", "filesystem_label": "example"}' \ "https://api.digitalocean.com/v2/volumes" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &VolumeCreateRequest{ Region: "nyc1", Name: "example", Description: "Block store for examples", SizeGigaBytes: 10, } volume, _, err := client.Storage.CreateVolume(ctx, createRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) volume = DropletKit::Volume.new( size_gigabytes: 10, name: 'Example', description: 'Block store for examples', region: 'nyc1' ) client.volumes.create(volume) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "size_gigabytes": 10, "name": "ext4-example", "description": "Block store for examples", "region": "nyc1", "filesystem_type": "ext4", "filesystem_label": "ext4_volume_01" } resp = client.volumes.create(body=req) ``` #### Responses **201** The response will be a JSON object with a key called volume. The value will be an object containing the standard attributes associated with a volume. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `volume` object optional **Show child properties** `created_at` string optional read-only Example: `2020-03-02T17:00:49Z` A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. `description` string optional Example: `Block store for examples` An optional free-form text field to describe a block storage volume. `droplet_ids` array of integer optional read-only Nullable Example: `[]` An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. `id` string optional read-only Example: `506f78a4-e098-11e5-ad9f-000f53306ae1` The unique identifier for the block storage volume. `name` string optional Example: `example` A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. `size_gigabytes` integer optional Example: `10` The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings applied to the resource. Requires `tag:read` scope. `filesystem_label` string optional Example: `example` The label currently applied to the filesystem. `filesystem_type` string optional Example: `ext4` The type of filesystem currently in-use on the volume. `region` object optional read-only **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "volume": { "created_at": "2020-03-02T17:00:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53306ae1", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "size_gigabytes": 10 } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Block Storage Volume by Name `/v2/volumes` Block storage volumes may also be deleted by name by sending a DELETE request with the volume's **name** and the **region slug** for the region it is located in as query parameters to `/v2/volumes?name=$VOLUME_NAME®ion=nyc1`. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Query Parameters `name` string optional Example: `example` The block storage volume's name. `region` string (enum) optional Example: `nyc3` The slug identifier for the region where the resource is available. ##### Request: `/v2/volumes` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes?name=example®ion=nyc1" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volumes.delete_by_name(name="ext4-ex") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Volume Snapshot `/v2/volumes/snapshots/{snapshot_id}` To retrieve the details of a snapshot that has been created from a volume, send a GET request to `/v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID`. #### Path Parameters `snapshot_id` string required Example: `fbe805e8-866b-11e6-96bf-000f53315a41` The unique identifier for the snapshot. ##### Request: `/v2/volumes/snapshots/{snapshot_id}` ### cURL ```bash curl -X GET \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "big-data-snapshot1475261774" } resp = client.volume_snapshots.get_by_id(snapshot_id="da3aa3a") ``` #### Responses **200** You will get back a JSON object that has a snapshot key. This will contain the standard snapshot attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `snapshot` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "snapshot": { "created_at": "2020-09-30T18:56:14Z", "id": "8fa70202-873f-11e6-8b68-000f533176b1", "min_disk_size": 10, "name": "big-data-snapshot1475261774", "regions": [ "nyc1" ], "resource_id": "82a48a18-873f-11e6-96bf-000f53315a41", "resource_type": "volume", "size_gigabytes": 10, "tags": [ "aninterestingtag" ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Volume Snapshot `/v2/volumes/snapshots/{snapshot_id}` To delete a volume snapshot, send a DELETE request to `/v2/volumes/snapshots/$VOLUME_SNAPSHOT_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `snapshot_id` string required Example: `fbe805e8-866b-11e6-96bf-000f53315a41` The unique identifier for the snapshot. ##### Request: `/v2/volumes/snapshots/{snapshot_id}` ### cURL ```bash curl -X DELETE \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/snapshots/fbe805e8-866b-11e6-96bf-000f53315a41" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Storage.DeleteSnapshot(ctx, "82a48a18-873f-11e6-96bf-000f53315a41") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.snapshots.delete(id: "fbe805e8-866b-11e6-96bf-000f53315a41") ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "big-data-snapshot1475261774" } resp = client.volume_snapshots.delete_by_id(snapshot_id="da3aa3a") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Block Storage Volume `/v2/volumes/{volume_id}` To show information about a block storage volume, send a GET request to `/v2/volumes/$VOLUME_ID`. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. ##### Request: `/v2/volumes/{volume_id}` ### cURL ``` # Retrieve an existing volume curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51" # Retrieve and existing volume by name curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes?name=example®ion=nyc1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() volume, _, err := client.Storage.GetVolume(ctx, "7724db7c-e098-11e5-b522-000f53304e51") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.volumes.find(id: '7724db7c-e098-11e5-b522-000f53304e51') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volumes.get(volume_id="7724db7c") ``` #### Responses **200** The response will be a JSON object with a key called volume. The value will be an object containing the standard attributes associated with a volume. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `volume` object optional **Show child properties** `created_at` string optional read-only Example: `2020-03-02T17:00:49Z` A time value given in ISO8601 combined date and time format that represents when the block storage volume was created. `description` string optional Example: `Block store for examples` An optional free-form text field to describe a block storage volume. `droplet_ids` array of integer optional read-only Nullable Example: `[]` An array containing the IDs of the Droplets the volume is attached to. Note that at this time, a volume can only be attached to a single Droplet. `id` string optional read-only Example: `506f78a4-e098-11e5-ad9f-000f53306ae1` The unique identifier for the block storage volume. `name` string optional Example: `example` A human-readable name for the block storage volume. Must be lowercase and be composed only of numbers, letters and "-", up to a limit of 64 characters. The name must begin with a letter. `size_gigabytes` integer optional Example: `10` The size of the block storage volume in GiB (1024^3). This field does not apply when creating a volume from a snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings applied to the resource. Requires `tag:read` scope. `filesystem_label` string optional Example: `example` The label currently applied to the filesystem. `filesystem_type` string optional Example: `ext4` The type of filesystem currently in-use on the volume. `region` object optional read-only **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "volume": { "created_at": "2020-03-02T17:00:49Z", "description": "Block store for examples", "droplet_ids": [], "filesystem_label": "example", "filesystem_type": "ext4", "id": "506f78a4-e098-11e5-ad9f-000f53306ae1", "name": "example", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc1" }, "size_gigabytes": 10 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Block Storage Volume `/v2/volumes/{volume_id}` To delete a block storage volume, destroying all data and removing it from your account, send a DELETE request to `/v2/volumes/$VOLUME_ID`. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. ##### Request: `/v2/volumes/{volume_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/7724db7c-e098-11e5-b522-000f53304e51" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Storage.DeleteVolume(ctx, "7724db7c-e098-11e5-b522-000f53304e51") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.volumes.delete(id: '7724db7c-e098-11e5-b522-000f53304e51') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.volumes.delete(volume_id="7724db7c") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Snapshots for a Volume `/v2/volumes/{volume_id}/snapshots` To retrieve the snapshots that have been created from a volume, send a GET request to `/v2/volumes/$VOLUME_ID/snapshots`. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/volumes/{volume_id}/snapshots` ### cURL ```bash curl -X GET \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/volumes/82a48a18-873f-11e6-96bf-000f53315a41/snapshots?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } volumes, _, err := client.Storage.ListSnapshots(ctx, '82a48a18-873f-11e6-96bf-000f53315a41', opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) snapshots = client.volumes.snapshots(id: '82a48a18-873f-11e6-96bf-000f53315a41') snapshots.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "big-data-snapshot1475261774" } resp = client.volume_snapshots.list(snapshot_id="da3aa3a") ``` #### Responses **200** You will get back a JSON object that has a snapshots key. This will be set to an array of snapshot objects, each of which contain the standard snapshot attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `snapshots` array of object optional **Show child properties** `id` string required Example: `6372321` The unique identifier for the snapshot. `created_at` string (date-time) required Example: `2020-07-28T16:47:44Z` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. `min_disk_size` integer required Example: `25` The minimum size in GB required for a volume or Droplet to use this snapshot. `name` string required Example: `web-01-1595954862243` A human-readable name for the snapshot. `regions` array of string required Example: `["nyc3","sfo3"]` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. `size_gigabytes` number (float) required Example: `2.34` The billable size of the snapshot in gigabytes. `resource_id` string required Example: `200776916` The unique identifier for the resource that the snapshot originated from. `resource_type` string, one of: droplet, volume required Example: `droplet` The type of resource that the snapshot originated from. `tags` array of string required Nullable Example: `["web","env:prod"]` An array of Tags the snapshot has been tagged with. Requires `tag:read` scope. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": {}, "meta": { "total": 1 }, "snapshots": [ { "created_at": "2020-09-30T18:56:12Z", "id": "8eb4d51a-873f-11e6-96bf-000f53315a41", "min_disk_size": 10, "name": "big-data-snapshot1475261752", "regions": [ "nyc1" ], "resource_id": "82a48a18-873f-11e6-96bf-000f53315a41", "resource_type": "volume", "size_gigabytes": 0, "tags": null } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Snapshot from a Volume `/v2/volumes/{volume_id}/snapshots` To create a snapshot from a volume, sent a POST request to `/v2/volumes/$VOLUME_ID/snapshots`. #### Path Parameters `volume_id` string (uuid) required Example: `7724db7c-e098-11e5-b522-000f53304e51` The ID of the block storage volume. #### Request Body: `application/json` `name` string required Example: `big-data-snapshot1475261774` A human-readable name for the volume snapshot. `tags` array of string optional Nullable Example: `["base-image","prod"]` A flat array of tag names as strings to be applied to the resource. Tag names may be for either existing or new tags. Requires `tag:create` scope. ##### Request: `/v2/volumes/{volume_id}/snapshots` ### Payload Content type `application/json` ```json { "name": "big-data-snapshot1475261774" } ``` ### cURL ```bash curl -X POST \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"big-data-snapshot1475261774", "tags":["aninterestingtag"]}' \ "https://api.digitalocean.com/v2/volumes/82a48a18-873f-11e6-96bf-000f53315a41/snapshots" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() snapshot, _, err := client.Storage.CreateSnapshot(ctx, &godo.SnapshotCreateRequest{ VolumeID: "82a48a18-873f-11e6-96bf-000f53315a41", Name: "my snapshot", Description: "my description", Tags: []string{"one", "two"}, }) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.volumes.create_snapshot(id: "82a48a18-873f-11e6-96bf-000f53315a41", name: "big-data-snapshot1475261774") ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "big-data-snapshot1475261774" } resp = client.volume_snapshots.create(volume_id="da3aa3a", body=req) ``` #### Responses **201** You will get back a JSON object that has a snapshot key. This will contain the standard snapshot attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `snapshot` object optional **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "snapshot": { "created_at": "2020-09-30T18:56:14Z", "id": "8fa70202-873f-11e6-8b68-000f533176b1", "min_disk_size": 10, "name": "big-data-snapshot1475261774", "regions": [ "nyc1" ], "resource_id": "82a48a18-873f-11e6-96bf-000f53315a41", "resource_type": "volume", "size_gigabytes": 10, "tags": [ "aninterestingtag" ] } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Increase the Size of DigitalOcean Volumes Block Storage](https://docs.digitalocean.com/products/volumes/how-to/increase-size/index.html.md), [How to Mount and Unmount Volumes](https://docs.digitalocean.com/products/volumes/how-to/mount-unmount/index.html.md), [Volume Pricing](https://docs.digitalocean.com/products/volumes/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/byoip-prefixes/ --- title: BYOIP Prefixes description: Bring your own IP (BYOIP) lets you provision your own IPv4 network prefixes to your account, then assign those IPs to your DigitalOcean resources. … product: Reference url: https://docs.digitalocean.com/reference/api/reference/byoip-prefixes/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # BYOIP Prefixes Generated on 4 Dec 2026 Bring your own IP (BYOIP) lets you provision your own IPv4 network prefixes to your account, then assign those IPs to your DigitalOcean resources. BYOIP supports the following features: - IPv4 addresses - Network sizes of anywhere from `/24` (256 addresses) to `/18` (16,384 addresses) - Same API and management interface as our existing reserved IPs feature - Assignable to Droplets, and to external regional load balancers and public NAT gateways at creation Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List BYOIP Prefixes](#byoipPrefixes_list) - **POST** [Create a BYOIP Prefix](#byoipPrefixes_create) - **GET** [Get a BYOIP Prefix](#byoipPrefixes_get) - **PATCH** [Update a BYOIP Prefix](#byoipPrefixes_patch) - **DELETE** [Delete a BYOIP Prefix](#byoipPrefixes_delete) - **GET** [List BYOIP Prefix Resources](#byoipPrefixes_list_resources) ## GET List BYOIP Prefixes `/v2/byoip_prefixes` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: byoip_prefix:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all BYOIP prefixes, send a GET request to `/v2/byoip_prefixes`. A successful response will return a list of all BYOIP prefixes associated with the account. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/byoip_prefixes` ### cURL ```bash curl -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/byoip_prefixes" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() byoipPrefixes, _, err := client.BYOIPPrefixes.List(ctx, &godo.ListOptions{ Page: 1, PerPage: 10, }) if err != nil { panic(err) } // use byoipPrefixes } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.byoip_prefixes.list() ``` #### Responses **200** List of BYOIP prefixes as an array of BYOIP prefix JSON objects Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `byoip_prefixes` array of object optional **Show child properties** `advertised` boolean optional Example: `true` Whether the BYOIP prefix is being advertised `failure_reason` string optional Reason for failure, if applicable `locked` boolean optional Example: `false` Whether the BYOIP prefix is locked `name` string optional Name of the BYOIP prefix `prefix` string optional Example: `203.0.113.0/24` The IP prefix in CIDR notation `project_id` string optional Example: `12345678-1234-1234-1234-123456789012` The ID of the project associated with the BYOIP prefix `region` string optional Example: `nyc3` Region where the BYOIP prefix is located `status` string optional Example: `active` Status of the BYOIP prefix `uuid` string optional Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` Unique identifier for the BYOIP prefix `validations` array of object optional List of validation statuses for the BYOIP prefix **Show child properties** `name` string optional Example: `SIGNATURE HASH` Name of the validation `note` string optional Additional notes or details about the validation `status` string optional Example: `FAILED` Status of the validation `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "byoip_prefixes": [ { "advertised": true, "failure_reason": "", "locked": false, "prefix": "203.0.113.0/24", "project_id": "12345678-1234-1234-1234-123456789012", "region": "nyc3", "status": "active", "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "validations": [] }, { "advertised": false, "failure_reason": "", "locked": false, "prefix": "203.1.113.0/24", "project_id": "12345678-1234-1234-1234-123456789012", "region": "sfo2", "status": "in_progress", "uuid": "123e4567-e89b-12d3-a456-426614174001", "validations": [] } ], "links": {}, "meta": { "total": 2 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a BYOIP Prefix `/v2/byoip_prefixes` To create a BYOIP prefix, send a POST request to `/v2/byoip_prefixes`. A successful request will initiate the process of bringing your BYOIP Prefix into your account. The response will include the details of the created prefix, including its UUID and status. #### Request Body: `application/json` `prefix` string required Example: `203.11.13.0/24` The IP prefix in CIDR notation to bring `region` string required Example: `nyc3` The region where the prefix will be created `signature` string required Example: `` The signature hash for the prefix creation request ##### Request: `/v2/byoip_prefixes` ### Payload Content type `application/json` ```json { "prefix": "203.11.13.0/24", "region": "nyc3", "signature": "\u003csample-signature\u003e" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"prefix": "203.0.113.0/24", "region": "nyc3", "signature": "$SIGNATURE"}' \ "https://api.digitalocean.com/v2/byoip_prefixes" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() signatureHash := "" createRequest := &godo.BYOIPPrefixCreateReq{ Prefix: "203.0.113.0/24", Region: "nyc3", Signature: signatureHash, } byoipPrefix, _, err := client.BYOIPPrefixes.Create(ctx, createRequest) if err != nil { panic(err) } // use byoipPrefix } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "prefix": "203.0.113.0/24", "region": "nyc3", "signature": "", } resp = client.byoip_prefixes.create(body=req) ``` #### Responses **202** BYOIP prefix request accepted, response will contain the details of the created prefix. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `region` string optional Example: `nyc3` The region where the prefix is created `status` string optional Example: `in_progress` The status of the BYOIP prefix `uuid` string optional Example: `123e4567-e89b-12d3-a456-426614174000` The unique identifier for the BYOIP prefix **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "byoip_prefix": { "region": "nyc3", "status": "in_progress", "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a BYOIP Prefix `/v2/byoip_prefixes/{byoip_prefix_uuid}` To get a BYOIP prefix, send a GET request to `/v2/byoip_prefixes/$byoip_prefix_uuid`. A successful response will return the details of the specified BYOIP prefix. #### Path Parameters `byoip_prefix_uuid` string (uuid) >= 1 required Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` The unique identifier for the BYOIP Prefix. ##### Request: `/v2/byoip_prefixes/{byoip_prefix_uuid}` ### cURL ```bash curl -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/byoip_prefixes/fa3b-1234-5678-90ab-cdef01234567" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() byoipPrefix, _, err := client.BYOIPPrefixes.Get(ctx, "fa3b-1234-5678-90ab-cdef01234567") if err != nil { panic(err) } // use byoipPrefix } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.byoip_prefixes.get(byoip_prefix_uuid="fa3b-1234-5678-90ab-cdef01234567") ``` #### Responses **200** Details of the requested BYOIP prefix Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `byoip_prefix` object optional **Show child properties** `advertised` boolean optional Example: `true` Whether the BYOIP prefix is being advertised `failure_reason` string optional Reason for failure, if applicable `locked` boolean optional Example: `false` Whether the BYOIP prefix is locked `name` string optional Name of the BYOIP prefix `prefix` string optional Example: `203.0.113.0/24` The IP prefix in CIDR notation `project_id` string optional Example: `12345678-1234-1234-1234-123456789012` The ID of the project associated with the BYOIP prefix `region` string optional Example: `nyc3` Region where the BYOIP prefix is located `status` string optional Example: `active` Status of the BYOIP prefix `uuid` string optional Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` Unique identifier for the BYOIP prefix `validations` array of object optional List of validation statuses for the BYOIP prefix **Show child properties** `name` string optional Example: `SIGNATURE HASH` Name of the validation `note` string optional Additional notes or details about the validation `status` string optional Example: `FAILED` Status of the validation **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "byoip_prefix": { "advertised": true, "failure_reason": "", "locked": false, "prefix": "203.0.113.0/24", "project_id": "12345678-1234-1234-1234-123456789012", "region": "nyc3", "status": "active", "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "validations": [] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update a BYOIP Prefix `/v2/byoip_prefixes/{byoip_prefix_uuid}` To update a BYOIP prefix, send a PATCH request to `/v2/byoip_prefixes/$byoip_prefix_uuid`. Currently, you can update the advertisement status of the prefix. The response will include the updated details of the prefix. #### Path Parameters `byoip_prefix_uuid` string (uuid) required Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` A unique identifier for a BYOIP prefix. #### Request Body: `application/json` `advertise` boolean optional Example: `true` Whether the BYOIP prefix should be advertised ##### Request: `/v2/byoip_prefixes/{byoip_prefix_uuid}` ### Payload Content type `application/json` ```json { "advertise": true } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"advertise": true}' \ "https://api.digitalocean.com/v2/byoip_prefixes/$BYOIP_PREFIX_UUID" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() byoipPrefixUUID := "f47ac10b-58cc-4372-a567-0e02b2c3d479" advertise := true updateRequest := &godo.BYOIPPrefixUpdateReq{ Advertise: &advertise, } byoipPrefix, _, err := client.BYOIPPrefixes.Update(ctx, byoipPrefixUUID, updateRequest) if err != nil { panic(err) } // use byoipPrefix } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) byoip_prefix_uuid = "f47ac10b-58cc-4372-a567-0e02b2c3d479" req = { "advertise": True, } resp = client.byoip_prefixes.update(byoip_prefix_uuid=byoip_prefix_uuid, body=req) ``` #### Responses **202** Details of the updated BYOIP prefix Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `byoip_prefix` object optional **Show child properties** `advertised` boolean optional Example: `true` Whether the BYOIP prefix is being advertised `failure_reason` string optional Reason for failure, if applicable `locked` boolean optional Example: `false` Whether the BYOIP prefix is locked `name` string optional Name of the BYOIP prefix `prefix` string optional Example: `203.0.113.0/24` The IP prefix in CIDR notation `project_id` string optional Example: `12345678-1234-1234-1234-123456789012` The ID of the project associated with the BYOIP prefix `region` string optional Example: `nyc3` Region where the BYOIP prefix is located `status` string optional Example: `active` Status of the BYOIP prefix `uuid` string optional Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` Unique identifier for the BYOIP prefix `validations` array of object optional List of validation statuses for the BYOIP prefix **Show child properties** `name` string optional Example: `SIGNATURE HASH` Name of the validation `note` string optional Additional notes or details about the validation `status` string optional Example: `FAILED` Status of the validation **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "byoip_prefix": { "advertised": true, "failure_reason": "", "locked": false, "prefix": "203.0.113.0/24", "project_id": "12345678-1234-1234-1234-123456789012", "region": "nyc3", "status": "active", "uuid": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "validations": [] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a BYOIP Prefix `/v2/byoip_prefixes/{byoip_prefix_uuid}` To delete a BYOIP prefix and remove it from your account, send a DELETE request to `/v2/byoip_prefixes/$byoip_prefix_uuid`. A successful request will receive a 202 status code with no body in response. This indicates that the request was accepted and the prefix is being deleted. #### Path Parameters `byoip_prefix_uuid` string (uuid) >= 1 required Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` The unique identifier for the BYOIP Prefix. ##### Request: `/v2/byoip_prefixes/{byoip_prefix_uuid}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/byoip_prefixes/fa3b-1234-5678-90ab-cdef01234567" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.BYOIPPrefixes.Delete(ctx, "fa3b-1234-5678-90ab-cdef01234567") if err != nil { panic(err) } } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.byoip_prefixes.delete(byoip_prefix_uuid="fa3b-1234-5678-90ab-cdef01234567") ``` #### Responses **202** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List BYOIP Prefix Resources `/v2/byoip_prefixes/{byoip_prefix_uuid}/ips` To list resources associated with BYOIP prefixes, send a GET request to `/v2/byoip_prefixes/{byoip_prefix_uuid}/ips`. A successful response will return a list of resources associated with the specified BYOIP prefix. #### Path Parameters `byoip_prefix_uuid` string (uuid) >= 1 required Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` The unique identifier for the BYOIP Prefix. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/byoip_prefixes/{byoip_prefix_uuid}/ips` ### cURL ```bash curl -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/byoip_prefixes/fa3b-1234-5678-90ab-cdef01234567/ips" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() resources, _, err := client.BYOIPPrefixes.GetResources(ctx, "fa3b-1234-5678-90ab-cdef01234567", &godo.ListOptions{ Page: 1, PerPage: 20, }) if err != nil { panic(err) } // use resources } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.byoip_prefixes.resources_list(byoip_prefix_uuid="fa3b-1234-5678-90ab-cdef01234567") ``` #### Responses **200** List of IP addresses assigned to resources (such as Droplets) in a BYOIP prefix Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `ips` array of object optional **Show child properties** `assigned_at` string (date-time) optional Example: `2025-06-25T12:00:00Z` Time when the allocation was assigned `byoip` string optional Example: `f47ac10b-58cc-4372-a567-0e02b2c3d479` The BYOIP prefix UUID `id` integer (int64) optional Example: `10001` Unique identifier for the allocation `region` string optional Example: `nyc3` Region where the allocation is made `resource` string optional Example: `do:droplet:fa3c10b-58cc-4372-a567-0e02b2c3d479` The resource associated with the allocation `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "ips": [ { "assigned_at": "2025-06-25T12:00:00Z", "byoip": "203.0.113.2", "id": 11111023, "region": "nyc3", "resource": "do:droplet:fa3c10b-58cc-4372-a567-0e02b2c3d479" }, { "assigned_at": "2025-06-25T13:00:00Z", "byoip": "203.0.113.3", "id": 11111024, "region": "nyc3", "resource": "do:droplet:fa3c10b-58cc-4372-a567-0e02b2c3d480" } ], "links": {}, "meta": { "total": 2 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Reserved IPs Pricing](https://docs.digitalocean.com/products/networking/reserved-ips/details/pricing/index.html.md), [How to Send Outbound Traffic Over a Reserved IP](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/index.html.md), [How to Reassign or Unassign Reserved IPs](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/modify/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/cdn-endpoints/ --- title: CDN Endpoints description: Content hosted in DigitalOcean's object storage solution, [Spaces](https://docs.digitalocean.com/products/spaces/), can optionally be served by our … product: Reference url: https://docs.digitalocean.com/reference/api/reference/cdn-endpoints/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # CDN Endpoints Generated on 4 Dec 2026 Content hosted in DigitalOcean's object storage solution, [Spaces](https://docs.digitalocean.com/products/spaces/index.html.md), can optionally be served by our globally distributed Content Delivery Network (CDN). By sending requests to `/v2/cdn/endpoints`, you can list, create, or delete CDN Endpoints as well as purge cached content. To use a custom subdomain to access the CDN Endpoint, provide the ID of a DigitalOcean managed TLS certificate and the fully qualified domain name for the custom subdomain. CDN endpoints have a rate limit of five requests per 10 seconds. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All CDN Endpoints](#cdn_list_endpoints) - **POST** [Create a New CDN Endpoint](#cdn_create_endpoint) - **GET** [Retrieve an Existing CDN Endpoint](#cdn_get_endpoint) - **PUT** [Update a CDN Endpoint](#cdn_update_endpoints) - **DELETE** [Delete a CDN Endpoint](#cdn_delete_endpoint) - **DELETE** [Purge the Cache for an Existing CDN Endpoint](#cdn_purge_cache) ## GET List All CDN Endpoints `/v2/cdn/endpoints` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: cdn:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the CDN endpoints available on your account, send a GET request to `/v2/cdn/endpoints`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/cdn/endpoints` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/cdn/endpoints" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } cdns, _, err := client.CDNs.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) cdns = client.cdns.all cdns.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.cdn.list_endpoints() ``` #### Responses **200** The result will be a JSON object with an endpoints key. This will be set to an array of endpoint objects, each of which will contain the standard CDN endpoint attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoints` array of object optional **Show child properties** `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `created_at` string (date-time) optional read-only Example: `2018-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `endpoint` string (hostname) optional read-only Example: `static-images.nyc3.cdn.digitaloceanspaces.com` The fully qualified domain name (FQDN) from which the CDN-backed content is served. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a CDN endpoint. `origin` string (hostname) required Example: `static-images.nyc3.digitaloceanspaces.com` The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "endpoints": [ { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "created_at": "2018-07-19T15:04:16Z", "custom_domain": "static.example.com", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New CDN Endpoint `/v2/cdn/endpoints` To create a new CDN endpoint, send a POST request to `/v2/cdn/endpoints`. The origin attribute must be set to the fully qualified domain name (FQDN) of a DigitalOcean Space. Optionally, the TTL may be configured by setting the `ttl` attribute. A custom subdomain may be configured by specifying the `custom_domain` and `certificate_id` attributes. #### Request Body: `application/json` `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `created_at` string (date-time) optional read-only Example: `2018-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `endpoint` string (hostname) optional read-only Example: `static-images.nyc3.cdn.digitaloceanspaces.com` The fully qualified domain name (FQDN) from which the CDN-backed content is served. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a CDN endpoint. `origin` string (hostname) required Example: `static-images.nyc3.digitaloceanspaces.com` The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. ##### Request: `/v2/cdn/endpoints` ### Payload Content type `application/json` Example ```json { "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } ``` ```json { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "custom_domain": "static.example.com", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"origin": "static-images.nyc3.digitaloceanspaces.com","certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf","custom_domain": "static.example.com","ttl": 3600}' \ "https://api.digitalocean.com/v2/cdn/endpoints" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.CDNCreateRequest{ Origin: "static-images.nyc3.digitaloceanspaces.com", TTL: 3600, CustomDomain: "static.example.com", CertificateID: "892071a0-bb95-49bc-8021-3afd67a210b", } cdn, _, err := client.CDNs.Create(ctx, createRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) cdn = DropletKit::CDN.new( origin: 'static-images.nyc3.digitaloceanspaces.com', custom_domain: 'static.example.com', certificate_id: '892071a0-bb95-49bc-8021-3afd67a210bf', ttl: 3600 ) client.cdns.create(cdn) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_req = {"origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600} create_resp = client.cdn.create_endpoint(create_req) ``` #### Responses **201** The response will be a JSON object with an endpoint key. This will be set to an object containing the standard CDN endpoint attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object optional **Show child properties** `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `created_at` string (date-time) optional read-only Example: `2018-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `endpoint` string (hostname) optional read-only Example: `static-images.nyc3.cdn.digitaloceanspaces.com` The fully qualified domain name (FQDN) from which the CDN-backed content is served. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a CDN endpoint. `origin` string (hostname) required Example: `static-images.nyc3.digitaloceanspaces.com` The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** Example ```json { "endpoint": { "created_at": "2018-07-19T15:04:16Z", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` ```json { "endpoint": { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "created_at": "2018-07-19T15:04:16Z", "custom_domain": "static.example.com", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing CDN Endpoint `/v2/cdn/endpoints/{cdn_id}` To show information about an existing CDN endpoint, send a GET request to `/v2/cdn/endpoints/$ENDPOINT_ID`. #### Path Parameters `cdn_id` string (uuid) >= 1 required Example: `19f06b6a-3ace-4315-b086-499a0e521b76` A unique identifier for a CDN endpoint. ##### Request: `/v2/cdn/endpoints/{cdn_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() cdn, _, err := client.CDNs.Get(ctx, "19f06b6a-3ace-4315-b086-499a0e521b76") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.cdns.find(id: '19f06b6a-3ace-4315-b086-499a0e521b76') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.cdn.get_endpoint(cdn_id="aa34ba1") ``` #### Responses **200** The response will be a JSON object with an endpoint key. This will be set to an object containing the standard CDN endpoint attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object optional **Show child properties** `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `created_at` string (date-time) optional read-only Example: `2018-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `endpoint` string (hostname) optional read-only Example: `static-images.nyc3.cdn.digitaloceanspaces.com` The fully qualified domain name (FQDN) from which the CDN-backed content is served. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a CDN endpoint. `origin` string (hostname) required Example: `static-images.nyc3.digitaloceanspaces.com` The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "endpoint": { "created_at": "2018-07-19T15:04:16Z", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` ```json { "endpoint": { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "created_at": "2018-07-19T15:04:16Z", "custom_domain": "static.example.com", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a CDN Endpoint `/v2/cdn/endpoints/{cdn_id}` To update the TTL, certificate ID, or the FQDN of the custom subdomain for an existing CDN endpoint, send a PUT request to `/v2/cdn/endpoints/$ENDPOINT_ID`. #### Path Parameters `cdn_id` string (uuid) >= 1 required Example: `19f06b6a-3ace-4315-b086-499a0e521b76` A unique identifier for a CDN endpoint. #### Request Body: `application/json` `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. ##### Request: `/v2/cdn/endpoints/{cdn_id}` ### Payload Content type `application/json` ```json { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "custom_domain": "static.example.com", "ttl": 3600 } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"ttl": 1800}' \ "https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() updateRequest := &godo.CDNUpdateTTLRequest{TTL: 1800} cdn, _, err := client.CDNs.UpdateTTL(ctx, "19f06b6a-3ace-4315-b086-499a0e521b76", updateRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = '16f79fc8cd5adcfe528a0994311fa63cc877737b385b6ff7d12ed6684ba4fef5' client = DropletKit::Client.new(access_token: token) client.cdns.update_ttl(id: '19f06b6a-3ace-4315-b086-499a0e521b76', ttl: 1800) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) update_req = { "ttl": 3600, "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "custom_domain": "static.example.com", } update_resp = client.cdn.update_endpoints("19f06b6a", update_req) ``` #### Responses **200** The response will be a JSON object with an endpoint key. This will be set to an object containing the standard CDN endpoint attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `endpoint` object optional **Show child properties** `certificate_id` string (uuid) optional Example: `892071a0-bb95-49bc-8021-3afd67a210bf` The ID of a DigitalOcean managed TLS certificate used for SSL when a custom subdomain is provided. `created_at` string (date-time) optional read-only Example: `2018-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the CDN endpoint was created. `custom_domain` string (hostname) optional Example: `static.example.com` The fully qualified domain name (FQDN) of the custom subdomain used with the CDN endpoint. `endpoint` string (hostname) optional read-only Example: `static-images.nyc3.cdn.digitaloceanspaces.com` The fully qualified domain name (FQDN) from which the CDN-backed content is served. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a CDN endpoint. `origin` string (hostname) required Example: `static-images.nyc3.digitaloceanspaces.com` The fully qualified domain name (FQDN) for the origin server which provides the content for the CDN. This is currently restricted to a Space. `ttl` integer, one of: 60, 600, 3600, 86400, 604800 optional Example: `3600` The amount of time the content is cached by the CDN's edge servers in seconds. TTL must be one of 60, 600, 3600, 86400, or 604800. Defaults to 3600 (one hour) when excluded. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "endpoint": { "created_at": "2018-07-19T15:04:16Z", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` ```json { "endpoint": { "certificate_id": "892071a0-bb95-49bc-8021-3afd67a210bf", "created_at": "2018-07-19T15:04:16Z", "custom_domain": "static.example.com", "endpoint": "static-images.nyc3.cdn.digitaloceanspaces.com", "id": "19f06b6a-3ace-4315-b086-499a0e521b76", "origin": "static-images.nyc3.digitaloceanspaces.com", "ttl": 3600 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a CDN Endpoint `/v2/cdn/endpoints/{cdn_id}` To delete a specific CDN endpoint, send a DELETE request to `/v2/cdn/endpoints/$ENDPOINT_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `cdn_id` string (uuid) >= 1 required Example: `19f06b6a-3ace-4315-b086-499a0e521b76` A unique identifier for a CDN endpoint. ##### Request: `/v2/cdn/endpoints/{cdn_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.CDNs.Delete(ctx, "19f06b6a-3ace-4315-b086-499a0e521b76") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.cdns.delete(id: '19f06b6a-3ace-4315-b086-499a0e521b76') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.cdn.delete_endpoint(cdn_id="bba23af") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Purge the Cache for an Existing CDN Endpoint `/v2/cdn/endpoints/{cdn_id}/cache` To purge cached content from a CDN endpoint, send a DELETE request to `/v2/cdn/endpoints/$ENDPOINT_ID/cache`. The body of the request should include a `files` attribute containing a list of cached file paths to be purged. A path may be for a single file or may contain a wildcard (`*`) to recursively purge all files under a directory. When only a wildcard is provided, all cached files will be purged. There is a rate limit of 50 files per 20 seconds that can be purged. CDN endpoints have a rate limit of 5 requests per 10 seconds. Purging files using a wildcard path counts as a single request against the API's rate limit. Two identical purge requests cannot be sent at the same time. #### Path Parameters `cdn_id` string (uuid) >= 1 required Example: `19f06b6a-3ace-4315-b086-499a0e521b76` A unique identifier for a CDN endpoint. #### Request Body: `application/json` `files` array of string required Example: `["path/to/image.png","path/to/css/*"]` An array of strings containing the path to the content to be purged from the CDN cache. ##### Request: `/v2/cdn/endpoints/{cdn_id}/cache` ### Payload Content type `application/json` ```json { "files": [ "path/to/image.png", "path/to/css/*" ] } ``` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"files": ["assets/img/hero.png","assets/css/*"]}' \ "https://api.digitalocean.com/v2/cdn/endpoints/19f06b6a-3ace-4315-b086-499a0e521b76/cache" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() flushRequest := &godo.CDNFlushCacheRequest{ Files: []string{"assets/img/hero.png","assets/css/*"}, } _, err := client.CDNs.FlushCache(ctx, "19f06b6a-3ace-4315-b086-499a0e521b76", flushRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.cdns.flush_cache( id: '19f06b6a-3ace-4315-b086-499a0e521b76', files: ['assets/img/hero.png','assets/css/*'] ) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) purge_req = {"files": ["path/to/image.png", "path/to/css/*"]} purge_resp = client.cdn.purge_cache("19f06b6a", purge_req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Spaces Pricing](https://docs.digitalocean.com/products/spaces/details/pricing/index.html.md), [How to Enable the DigitalOcean Spaces CDN](https://docs.digitalocean.com/products/spaces/how-to/enable-cdn/index.html.md), [Set Up s3cmd 2.x with DigitalOcean Spaces](https://docs.digitalocean.com/products/spaces/reference/s3cmd/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/certificates/ --- title: Certificates description: In order to perform SSL termination on load balancers, DigitalOcean offers two types of [SSL certificate … product: Reference url: https://docs.digitalocean.com/reference/api/reference/certificates/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Certificates Generated on 4 Dec 2026 In order to perform SSL termination on load balancers, DigitalOcean offers two types of [SSL certificate management](https://docs.digitalocean.com/platform/teams/manage-certificates): - **Custom**: User-generated certificates may be uploaded to DigitalOcean where they will be placed in a fully encrypted and isolated storage system. - **Let's Encrypt**: Certificates may be automatically generated by DigitalOcean utilizing an integration with Let's Encrypt, the free and open certificate authority. These certificates will also be automatically renewed as required. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Certificates](#certificates_list) - **POST** [Create a New Certificate](#certificates_create) - **GET** [Retrieve an Existing Certificate](#certificates_get) - **DELETE** [Delete a Certificate](#certificates_delete) ## GET List All Certificates `/v2/certificates` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: certificate:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the certificates available on your account, send a GET request to `/v2/certificates`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `name` string optional Example: `certificate-name` Name of expected certificate ##### Request: `/v2/certificates` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/certificates" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } certs, _, err := client.Certificates.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) certificates = client.certificates.all certificates.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.certificates.list() ``` #### Responses **200** The result will be a JSON object with a certificates key. This will be set to an array of certificate objects, each of which will contain the standard certificate attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `certificates` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2017-02-08T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the certificate was created. `dns_names` array of string optional Example: `["www.example.com","example.com"]` An array of fully qualified domain names (FQDNs) for which the certificate was issued. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a certificate. `name` string optional Example: `web-cert-01` A unique human-readable name referring to a certificate. `not_after` string (date-time) optional read-only Example: `2017-02-22T00:23:00Z` A time value given in ISO8601 combined date and time format that represents the certificate's expiration date. `sha1_fingerprint` string optional read-only Example: `dfcc9f57d86bf58e321c2c6c31c7a971be244ac7` A unique identifier generated from the SHA-1 fingerprint of the certificate. `state` string, one of: pending, verified, error optional read-only Example: `verified` A string representing the current state of the certificate. It may be `pending`, `verified`, or `error`. `type` string, one of: custom, lets_encrypt optional Example: `lets_encrypt` A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "certificates": [ { "created_at": "2017-02-08T16:02:37Z", "dns_names": [ "" ], "id": "892071a0-bb95-49bc-8021-3afd67a210bf", "name": "web-cert-01", "not_after": "2017-02-22T00:23:00Z", "sha1_fingerprint": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "state": "verified", "type": "custom" }, { "created_at": "2018-03-09T18:44:11Z", "dns_names": [ "www.example.com", "example.com" ], "id": "ba9b9c18-6c59-46c2-99df-70da170a42ba", "name": "web-cert-02", "not_after": "2018-06-07T17:44:12Z", "sha1_fingerprint": "479c82b5c63cb6d3e6fac4624d58a33b267e166c", "state": "verified", "type": "lets_encrypt" } ], "links": {}, "meta": { "total": 2 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Certificate `/v2/certificates` To upload new SSL certificate which you have previously generated, send a POST request to `/v2/certificates`. When uploading a user-generated certificate, the `private_key`, `leaf_certificate`, and optionally the `certificate_chain` attributes should be provided. The type must be set to `custom`. When using Let's Encrypt to create a certificate, the `dns_names` attribute must be provided, and the type must be set to `lets_encrypt`. #### Request Body: `application/json` **Let's Encrypt Certificate Request** `name` string required Example: `web-cert-01` A unique human-readable name referring to a certificate. `type` string, one of: custom, lets_encrypt optional Example: `lets_encrypt` A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. `dns_names` array of string required Example: `["www.example.com","example.com"]` An array of fully qualified domain names (FQDNs) for which the certificate was issued. A certificate covering all subdomains can be issued using a wildcard (e.g. `*.example.com`). **Custom Certificate Request** `name` string required Example: `web-cert-01` A unique human-readable name referring to a certificate. `type` string, one of: custom, lets_encrypt optional Example: `lets_encrypt` A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. `certificate_chain` string optional The full PEM-formatted trust chain between the certificate authority's certificate and your domain's SSL certificate. `leaf_certificate` string required The contents of a PEM-formatted public SSL certificate. `private_key` string required The contents of a PEM-formatted private-key corresponding to the SSL certificate. ##### Request: `/v2/certificates` ### Payload Content type `application/json` ```json { "dns_names": [ "www.example.com", "example.com" ], "name": "web-cert-01", "type": "lets_encrypt" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "web-cert-01", "type": "custom", "private_key": "'"$(= 1 required Example: `4de7ac8b-495b-4884-9a69-1050c6793cd6` A unique identifier for a certificate. ##### Request: `/v2/certificates/{certificate_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/certificates/892071a0-bb95-49bc-8021-3afd67a210bf" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() cert, _, err := client.Certificates.Get(ctx, "892071a0-bb95-49bc-8021-3afd67a210bf") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.certificates.find(id: '892071a0-bb95-49bc-8021-3afd67a210bf') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.certificates.get( certificate_id="892071a0-bb95-49bc-8021-3afd67a210bf" ) ``` #### Responses **200** The response will be a JSON object with a certificate key. This will be set to an object containing the standard certificate attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `certificate` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2017-02-08T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the certificate was created. `dns_names` array of string optional Example: `["www.example.com","example.com"]` An array of fully qualified domain names (FQDNs) for which the certificate was issued. `id` string (uuid) optional read-only Example: `892071a0-bb95-49bc-8021-3afd67a210bf` A unique ID that can be used to identify and reference a certificate. `name` string optional Example: `web-cert-01` A unique human-readable name referring to a certificate. `not_after` string (date-time) optional read-only Example: `2017-02-22T00:23:00Z` A time value given in ISO8601 combined date and time format that represents the certificate's expiration date. `sha1_fingerprint` string optional read-only Example: `dfcc9f57d86bf58e321c2c6c31c7a971be244ac7` A unique identifier generated from the SHA-1 fingerprint of the certificate. `state` string, one of: pending, verified, error optional read-only Example: `verified` A string representing the current state of the certificate. It may be `pending`, `verified`, or `error`. `type` string, one of: custom, lets_encrypt optional Example: `lets_encrypt` A string representing the type of the certificate. The value will be `custom` for a user-uploaded certificate or `lets_encrypt` for one automatically generated with Let's Encrypt. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "certificate": { "created_at": "2017-02-08T16:02:37Z", "dns_names": [ "" ], "id": "892071a0-bb95-49bc-8021-3afd67a210bf", "name": "web-cert-01", "not_after": "2017-02-22T00:23:00Z", "sha1_fingerprint": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "state": "verified", "type": "custom" } } ``` ```json { "certificate": { "created_at": "2018-03-09T18:44:11Z", "dns_names": [ "www.example.com", "example.com" ], "id": "ba9b9c18-6c59-46c2-99df-70da170a42ba", "name": "web-cert-02", "not_after": "2018-06-07T17:44:12Z", "sha1_fingerprint": "479c82b5c63cb6d3e6fac4624d58a33b267e166c", "state": "verified", "type": "lets_encrypt" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Certificate `/v2/certificates/{certificate_id}` To delete a specific certificate, send a DELETE request to `/v2/certificates/$CERTIFICATE_ID`. #### Path Parameters `certificate_id` string (uuid) >= 1 required Example: `4de7ac8b-495b-4884-9a69-1050c6793cd6` A unique identifier for a certificate. ##### Request: `/v2/certificates/{certificate_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/certificates/892071a0-bb95-49bc-8021-3afd67a210bf" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Certificates.Delete(ctx, "892071a0-bb95-49bc-8021-3afd67a210bf") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.certificates.delete(id: '892071a0-bb95-49bc-8021-3afd67a210bf') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) del_resp = client.certificates.delete( certificate_id="892071a0-bb95-49bc-8021-3afd67a210bf" ) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Configure SSL Termination](https://docs.digitalocean.com/products/networking/load-balancers/how-to/ssl-termination/index.html.md), [How to Manage Regional Load Balancers](https://docs.digitalocean.com/products/networking/load-balancers/how-to/manage/index.html.md), [Load Balancers Pricing](https://docs.digitalocean.com/products/networking/load-balancers/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/container-registries/ --- title: Container Registries description: DigitalOcean now supports up to nine additional registries (for a total maximum of 10) per team if your container registry uses the Professional … product: Reference url: https://docs.digitalocean.com/reference/api/reference/container-registries/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Container Registries Generated on 4 Dec 2026 DigitalOcean now supports up to nine additional registries (for a total maximum of 10) per team if your container registry uses the Professional subscription plan. The storage is shared among the registries. This set of new APIs is backward compatible with `/v2/registry`. However, if you create more than one registry under a Professional plan, some of the `/v2/registry` APIs would not work. Hence, it is recommended to use `/v2/registries` for multiple registries. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Container Registries](#registries_list) - **POST** [Create Container Registry](#registries_create) - **GET** [Get a Container Registry By Name](#registries_get) - **DELETE** [Delete Container Registry By Name](#registries_delete) - **GET** [Get Docker Credentials By Registry Name](#registries_get_dockerCredentials) - **GET** [Get Subscription Information](#registries_get_subscription) - **POST** [Update Subscription Tier](#registries_update_subscription) - **GET** [List Registry Options (Subscription Tiers and Available Regions)](#registries_get_options) - **GET** [Get Active Garbage Collection](#registries_get_garbageCollection) - **POST** [Start Garbage Collection](#registries_run_garbageCollection) - **GET** [List Garbage Collections](#registries_list_garbageCollections) - **PUT** [Update Garbage Collection](#registries_update_garbageCollection) - **GET** [List All Container Registry Repositories (V2)](#registries_list_repositoriesV2) - **DELETE** [Delete Container Registry Repository](#registries_delete_repository) - **GET** [List All Container Registry Repository Tags](#registries_list_repositoryTags) - **DELETE** [Delete Container Registry Repository Tag](#registries_delete_repositoryTag) - **GET** [List All Container Registry Repository Manifests](#registries_list_repositoryManifests) - **DELETE** [Delete Container Registry Repository Manifest](#registries_delete_repositoryManifest) - **POST** [Validate a Container Registry Name](#registries_validate_name) ## GET List All Container Registries `/v2/registries` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: registry:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To get information about any container registry in your account, send a GET request to `/v2/registries/`. ##### Request: `/v2/registries` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get() ``` #### Responses **200** The response will be a JSON object with the key registry containing information about your registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `registries` array of oneOf optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "registries": [ { "created_at": "2020-03-21T16:02:37Z", "name": "example", "region": "fra1", "storage_usage_bytes": 29393920, "storage_usage_bytes_updated_at": "2020-11-04T21:39:49.530562231Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Container Registry `/v2/registries` To create your container registry, send a POST request to `/v2/registries`. The `name` becomes part of the URL for images stored in the registry. For example, if your registry is called `example`, an image in it will have the URL `registry.digitalocean.com/example/image:tag`. #### Request Body: `application/json` `insights` object optional write-only Nullable An object specifying the Insights telemetry that the customer opts in to for the container registry. This is only accepted when creating a registry and is not returned in responses. If the object is omitted, or if `logs` is not set, the registry is created with logs not enabled. **Show child properties** `logs` boolean optional Example: `true` A boolean value indicating whether the registry's logs are sent to Insights. Set this to `true` to send the registry's logs to Insights. `false`, and omitting `insights` or `logs`, both create the registry with logs not enabled. `name` string required Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string (enum) optional Example: `fra1` Slug of the region where registry data is stored. When not provided, a region will be selected. `subscription_tier_slug` string, one of: starter, basic, professional optional Example: `basic` The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint. ##### Request: `/v2/registries` ### Payload Content type `application/json` ```json { "insights": { "logs": true }, "name": "example", "region": "fra1", "subscription_tier_slug": "basic" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example", "subscription_tier_slug": "basic", "region": "fra1"}' \ "https://api.digitalocean.com/v2/registries" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example", "region": "fra1", "subscription_tier_slug": "basic" } resp = client.registries.create(body=req) ``` #### Responses **201** The response will be a JSON object with the key registry containing information about your registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `registry` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the registry was created. `name` string optional Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string optional Example: `fra1` Slug of the region where registry data is stored `storage_usage_bytes` integer optional read-only Example: `29393920` The amount of storage used in the registry in bytes. `storage_usage_bytes_updated_at` string (date-time) optional read-only Example: `2020-11-04T21:39:49.530562231Z` The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "registry": { "created_at": "2020-03-21T16:02:37Z", "name": "example", "region": "fra1", "storage_usage_bytes": 29393920, "storage_usage_bytes_updated_at": "2020-11-04T21:39:49.530562231Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Container Registry By Name `/v2/registries/{registry_name}` To get information about any container registry in your account, send a GET request to `/v2/registries/{registry_name}`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registries/{registry_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get(registry_name="example") ``` #### Responses **200** The response will be a JSON object with the key registry containing information about your registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `registry` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the registry was created. `name` string optional Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string optional Example: `fra1` Slug of the region where registry data is stored `storage_usage_bytes` integer optional read-only Example: `29393920` The amount of storage used in the registry in bytes. `storage_usage_bytes_updated_at` string (date-time) optional read-only Example: `2020-11-04T21:39:49.530562231Z` The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "registry": { "created_at": "2020-03-21T16:02:37Z", "name": "example", "region": "fra1", "storage_usage_bytes": 29393920, "storage_usage_bytes_updated_at": "2020-11-04T21:39:49.530562231Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry By Name `/v2/registries/{registry_name}` To delete your container registry, destroying all container image data stored in it, send a DELETE request to `/v2/registries/{registry_name}`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registries/{registry_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.delete(registry_name="example") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Docker Credentials By Registry Name `/v2/registries/{registry_name}/docker-credentials` In order to access your container registry with the Docker client or from a Kubernetes cluster, you will need to configure authentication. The necessary JSON configuration can be retrieved by sending a GET request to `/v2/registries/{registry_name}/docker-credentials`. The response will be in the format of a Docker `config.json` file. To use the config in your Kubernetes cluster, create a Secret with: ``` kubectl create secret generic docr \ --from-file=.dockerconfigjson=config.json \ --type=kubernetes.io/dockerconfigjson ``` By default, the returned credentials have read-only access to your registry and cannot be used to push images. This is appropriate for most Kubernetes clusters. To retrieve read/write credentials, suitable for use with the Docker client or in a CI system, read_write may be provided as query parameter. For example: `/v2/registries/{registry_name}/docker-credentials?read_write=true` By default, the returned credentials will not expire. To retrieve credentials with an expiry set, expiry_seconds may be provided as a query parameter. For example: `/v2/registries/{registry_name}/docker-credentials?expiry_seconds=3600` will return credentials that expire after one hour. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registries/{registry_name}/docker-credentials` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/docker-credentials" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get_docker_credentials(registry_name="example") ``` #### Responses **200** A Docker config.json file for the container registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `auths` object optional **Show child properties** `registry.digitalocean.com` object optional **Show child properties** `auth` string optional Example: `YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK` A base64 encoded string containing credentials for the container registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "auths": { "registry.digitalocean.com": { "auth": "YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Subscription Information `/v2/registries/subscription` A subscription is automatically created when you configure your container registry. To get information about your subscription, send a GET request to `/v2/registries/subscription`. It is similar to GET `/v2/registry/subscription`. ##### Request: `/v2/registries/subscription` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/subscription" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get_subscription() ``` #### Responses **200** The response will be a JSON object with a key called subscription containing information about your subscription. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `subscription` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-01-23T21:19:12Z` The time at which the subscription was created. `tier` object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `updated_at` string (date-time) optional read-only Example: `2020-11-05T15:53:24Z` The time at which the subscription was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "subscription": { "created_at": "2020-01-23T21:19:12Z", "tier": { "allow_storage_overage": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic", "storage_overage_price_in_cents": 2 }, "updated_at": "2020-11-05T15:53:24Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Update Subscription Tier `/v2/registries/subscription` After creating your registry, you can switch to a different subscription tier to better suit your needs. To do this, send a POST request to `/v2/registries/subscription`. It is similar to POST `/v2/registry/subscription`. #### Request Body: `application/json` `tier_slug` string, one of: starter, basic, professional optional Example: `basic` The slug of the subscription tier to sign up for. ##### Request: `/v2/registries/subscription` ### Payload Content type `application/json` ```json { "tier_slug": "basic" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tier_slug": "professional"}' \ "https://api.digitalocean.com/v2/registries/subscription" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "tier_slug": "basic" } resp = client.registries.update_subscription(body=req) ``` #### Responses **200** The response will be a JSON object with a key called subscription containing information about your subscription. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `subscription` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-01-23T21:19:12Z` The time at which the subscription was created. `tier` object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `updated_at` string (date-time) optional read-only Example: `2020-11-05T15:53:24Z` The time at which the subscription was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "subscription": { "created_at": "2020-01-23T21:19:12Z", "tier": { "allow_storage_overage": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic", "storage_overage_price_in_cents": 2 }, "updated_at": "2020-11-05T15:53:24Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Registry Options (Subscription Tiers and Available Regions) `/v2/registries/options` This endpoint serves to provide additional information as to which option values are available when creating a container registry. There are multiple subscription tiers available for container registry. Each tier allows a different number of image repositories to be created in your registry, and has a different amount of storage and transfer included. There are multiple regions available for container registry and controls where your data is stored. To list the available options, send a GET request to `/v2/registries/options`. This is similar to GET `/v2/registry/options`. ##### Request: `/v2/registries/options` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/options" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get_options() ``` #### Responses **200** The response will be a JSON object with a key called options which contains a key called subscription_tiers listing the available tiers. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `options` object optional **Show child properties** `available_regions` array of string optional Example: `["nyc3"]` `subscription_tiers` array of object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `eligibility_reasons` array of string, one of: OverRepositoryLimit, OverStorageLimit optional Example: `["OverRepositoryLimit"]` If your account is not eligible to use a certain subscription tier, this will include a list of reasons that prevent you from using the tier. `eligible` boolean optional Example: `true` A boolean indicating whether your account it eligible to use a certain subscription tier. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "options": { "available_regions": [ "nyc3", "sfo3", "ams3", "sgp1", "fra1" ], "subscription_tiers": [ { "allow_storage_overage": false, "eligibility_reasons": [ "OverRepositoryLimit" ], "eligible": false, "included_bandwidth_bytes": 524288000, "included_repositories": 1, "included_storage_bytes": 524288000, "monthly_price_in_cents": 0, "name": "Starter", "slug": "starter" }, { "allow_storage_overage": true, "eligible": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic" }, { "allow_storage_overage": true, "eligible": true, "included_bandwidth_bytes": 107374182400, "included_repositories": 0, "included_storage_bytes": 107374182400, "monthly_price_in_cents": 2000, "name": "Professional", "slug": "professional" } ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Active Garbage Collection `/v2/registries/{registry_name}/garbage-collection` To get information about the currently-active garbage collection for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collection`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registries/{registry_name}/garbage-collection` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/garbage-collection" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.get_garbage_collection(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Start Garbage Collection `/v2/registries/{registry_name}/garbage-collection` Garbage collection enables users to clear out unreferenced blobs (layer & manifest data) after deleting one or more manifests from a repository. If there are no unreferenced blobs resulting from the deletion of one or more manifests, garbage collection is effectively a noop. [See here for more information](https://docs.digitalocean.com/products/container-registry/how-to/clean-up-container-registry/index.html.md) about how and why you should clean up your container registry periodically. To request a garbage collection run on your registry, send a POST request to `/v2/registries/$REGISTRY_NAME/garbage-collection`. This will initiate the following sequence of events on your registry. - Set the registry to read-only mode, meaning no further write-scoped JWTs will be issued to registry clients. Existing write-scoped JWTs will continue to work until they expire which can take up to 15 minutes. - Wait until all existing write-scoped JWTs have expired. - Scan all registry manifests to determine which blobs are unreferenced. - Delete all unreferenced blobs from the registry. - Record the number of blobs deleted and bytes freed, mark the garbage collection status as `success`. - Remove the read-only mode restriction from the registry, meaning write-scoped JWTs will once again be issued to registry clients. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registries/{registry_name}/garbage-collection` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/garbage-collection" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.run_garbage_collection(registry_name="example") ``` #### Responses **201** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Garbage Collections `/v2/registries/{registry_name}/garbage-collections` To get information about past garbage collections for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collections`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registries/{registry_name}/garbage-collections` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/garbage-collections" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.list_garbage_collections(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collections. This will be set to an array containing objects representing each past garbage collection. Each will contain the standard Garbage Collection attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collections` array of object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collections": [ { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24.000Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44.000Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } ], "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Garbage Collection `/v2/registries/{registry_name}/garbage-collection/{garbage_collection_uuid}` To cancel the currently-active garbage collection for a registry, send a PUT request to `/v2/registries/$REGISTRY_NAME/garbage-collection/$GC_UUID` and specify one or more of the attributes below. It is similar to PUT `/v2/registries/$REGISTRY_NAME/garbage-collection/$GC_UUID`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `garbage_collection_uuid` string required Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` The UUID of a garbage collection run. #### Request Body: `application/json` `cancel` boolean optional Example: `true` A boolean value indicating that the garbage collection should be cancelled. ##### Request: `/v2/registries/{registry_name}/garbage-collection/{garbage_collection_uuid}` ### Payload Content type `application/json` ```json { "cancel": true } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/garbage-collection/example-gc-uuid" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.run_garbage_collection(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repositories (V2) `/v2/registries/{registry_name}/repositoriesV2` To list all repositories in your container registry, send a GET request to `/v2/registries/$REGISTRY_NAME/repositoriesV2`. It is similar to GET `/v2/registry/$REGISTRY_NAME/repositoriesV2`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Ignored when 'page_token' is provided. Default: `1` `page_token` string optional Example: `eyJUb2tlbiI6IkNnZGpiMjlz` Token to retrieve of the next or previous set of results more quickly than using 'page'. ##### Request: `/v2/registries/{registry_name}/repositoriesV2` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositoriesV2?page_size=1" ``` ### cURL (next page) ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositoriesV2?page=2&page_token=JPZmZzZXQiOjB9&per_page=1" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.list_repositories_v2(registry_name="example") ``` #### Responses **200** The response body will be a JSON object with a key of repositories. This will be set to an array containing objects each representing a repository. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `repositories` array of object optional **Show child properties** `latest_manifest` object optional **Show child properties** `blobs` array of object optional All blobs associated with this manifest **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the blob in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the blob `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the manifest in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available). `tags` array of string optional Example: `["latest","v1","v2"]` All tags associated with this manifest `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the manifest was last updated. `manifest_count` integer optional Example: `1` The number of manifests in the repository. `name` string optional Example: `repo-1` The name of the repository. `registry_name` string optional Example: `example` The name of the container registry. `tag_count` integer optional Example: `1` The number of tags in the repository. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "last": "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=5\u0026per_page=1", "next": "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=2\u0026page_token=JPZmZzZXQiOjB9\u0026per_page=1" } }, "meta": { "total": 5 }, "repositories": [ { "latest_manifest": { "blobs": [ { "compressed_size_bytes": 1471, "digest": "sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab" }, { "compressed_size_byte": 2814446, "digest": "sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e" }, { "compressed_size_bytes": 528, "digest": "sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a" } ], "compressed_size_bytes": 1972332, "digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 2816445, "tags": [ "v1", "v2" ], "updated_at": "2021-04-09T23:54:25Z" }, "manifest_count": 82, "name": "repo-1", "registry_name": "example", "tag_count": 57 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Repository `/v2/registries/{registry_name}/repositories/{repository_name}` To delete a container repository including all of its tags, send a DELETE request to `/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. ##### Request: `/v2/registries/{registry_name}/repositories/{repository_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositories/repo-1" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.delete_repository(registry_name="example", repository_name="repo-1") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repository Tags `/v2/registries/{registry_name}/repositories/{repository_name}/tags` To list all tags in one of your container registry's repository, send a GET request to `/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to list tags for `registry.digitalocean.com/example/my/repo`, the path would be `/v2/registry/example/repositories/my%2Frepo/tags`. It is similar to GET `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registries/{registry_name}/repositories/{repository_name}/tags` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositories/repo-1/tags" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.list_repository_tags(registry_name="example", repository_name="repo01") ``` #### Responses **200** The response body will be a JSON object with a key of tags. This will be set to an array containing objects each representing a tag. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `tags` array of object optional **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the tag in bytes. `manifest_digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the manifest associated with the tag. `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available). `tag` string optional Example: `latest` The name of the tag. `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the tag was last updated. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "meta": { "total": 1 }, "tags": [ { "compressed_size_bytes": 2803255, "manifest_digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 5861888, "tag": "latest", "updated_at": "2020-04-09T23:54:25Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Repository Tag `/v2/registries/{registry_name}/repositories/{repository_name}/tags/{repository_tag}` To delete a container repository tag in on of our container registries, send a DELETE request to `/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to delete `registry.digitalocean.com/example/my/repo:mytag`, the path would be `/v2/registry/example/repositories/my%2Frepo/tags/mytag`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. It is similar to DELETE `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. `repository_tag` string required Example: `06a447a` The name of a container registry repository tag. ##### Request: `/v2/registries/{registry_name}/repositories/{repository_name}/tags/{repository_tag}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositories/repo-1/tags/mytag" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.delete_repository_tag(registry_name="example", repository_name="repo-1", repository_tag="06a447a") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repository Manifests `/v2/registries/{registry_name}/repositories/{repository_name}/digests` To list all manifests in your container registry repository, send a GET request to `/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to list manifests for `registry.digitalocean.com/example/my/repo`, the path would be `/v2/registry/example/repositories/my%2Frepo/digests`. It is similar to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registries/{registry_name}/repositories/{repository_name}/digests` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositories/repo-1/digests" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.list_repository_manifests(registry_name="example", repository_name="repo01") ``` #### Responses **200** The response body will be a JSON object with a key of manifests. This will be set to an array containing objects each representing a manifest. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `manifests` array of object optional **Show child properties** `blobs` array of object optional All blobs associated with this manifest **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the blob in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the blob `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the manifest in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available). `tags` array of string optional Example: `["latest","v1","v2"]` All tags associated with this manifest `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the manifest was last updated. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1\u0026per_page=1", "last": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3\u0026per_page=1", "next": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3\u0026per_page=1", "prev": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1\u0026per_page=1" } }, "manifests": [ { "blobs": [ { "compressed_size_bytes": 1471, "digest": "sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab" }, { "compressed_size_byte": 2814446, "digest": "sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e" }, { "compressed_size_bytes": 528, "digest": "sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a" } ], "compressed_size_bytes": 1972332, "digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 2816445, "tags": [ "v1", "v2" ], "updated_at": "2021-04-09T23:54:25Z" } ], "meta": { "total": 3 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Repository Manifest `/v2/registries/{registry_name}/repositories/{repository_name}/digests/{manifest_digest}` To delete a container repository manifest by digest in one of your registries, send a DELETE request to `/v2/registries/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to delete `registry.digitalocean.com/example/my/repo@sha256:abcd`, the path would be `/v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. It is similar to DELETE `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. `manifest_digest` string required Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest of a container registry repository tag. ##### Request: `/v2/registries/{registry_name}/repositories/{repository_name}/digests/{manifest_digest}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registries/example/repositories/repo-1/digests/sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registries.delete_repository_manifest(registry_name="example", repository_name="repo-1", manifest_digest="sha256:cb8a924afd") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Validate a Container Registry Name `/v2/registries/validate-name` To validate that a container registry name is available for use, send a POST request to `/v2/registries/validate-name`. If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict. It is similar to `/v2/registry/validate-name`. #### Request Body: `application/json` `name` string required Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. ##### Request: `/v2/registries/validate-name` ### Payload Content type `application/json` ```json { "name": "example" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example"}' \ "https://api.digitalocean.com/v2/registries/validate-name" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example" } resp = client.registries.validate_name(body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Container Registry Quickstart](https://docs.digitalocean.com/products/container-registry/getting-started/quickstart/index.html.md), [How to Free Up Space in Your Container Registry](https://docs.digitalocean.com/products/container-registry/how-to/clean-up-container-registry/index.html.md), [How to Use Your Private DigitalOcean Container Registry with Docker and Kubernetes](https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/container-registry/ --- title: Container Registry description: DigitalOcean offers the ability for you to create a [private container registry](https://docs.digitalocean.com/products/container-registry/) to store … product: Reference url: https://docs.digitalocean.com/reference/api/reference/container-registry/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Container Registry Generated on 4 Dec 2026 DigitalOcean offers the ability for you to create a [private container registry](https://docs.digitalocean.com/products/container-registry/index.html.md) to store your Docker images for use with your Kubernetes clusters. This container registry runs inside the same datacenters as your cluster, ensuring reliable and performant rollout of image deployments. You can only create one registry per DigitalOcean account, but you can use that registry to create as many repositories as you wish. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [Get Container Registry Information](#registry_get) - **POST** [Create Container Registry](#registry_create) - **DELETE** [Delete Container Registry](#registry_delete) - **GET** [Get Subscription](#registry_get_subscription) - **POST** [Update Subscription Tier](#registry_update_subscription) - **GET** [Get Docker Credentials for Container Registry](#registry_get_dockerCredentials) - **POST** [Validate a Container Registry Name](#registry_validate_name) - **GET** [List All Container Registry Repositories](#registry_list_repositories) - **GET** [List All Container Registry Repositories (V2)](#registry_list_repositoriesV2) - **GET** [List All Container Registry Repository Tags](#registry_list_repositoryTags) - **DELETE** [Delete Container Registry Repository Tag](#registry_delete_repositoryTag) - **GET** [List All Container Registry Repository Manifests](#registry_list_repositoryManifests) - **DELETE** [Delete Container Registry Repository Manifest](#registry_delete_repositoryManifest) - **GET** [Get Active Garbage Collection](#registry_get_garbageCollection) - **POST** [Start Garbage Collection](#registry_run_garbageCollection) - **GET** [List Garbage Collections](#registry_list_garbageCollections) - **PUT** [Update Garbage Collection](#registry_update_garbageCollection) - **GET** [List Registry Options (Subscription Tiers and Available Regions)](#registry_get_options) ## GET Get Container Registry Information Deprecated `/v2/registry` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: registry:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To get information about your container registry, send a GET request to `/v2/registry`. This operation is not compatible with multiple registries in a DO account. You should use `/v2/registries/{registry_name}` instead. ##### Request: `/v2/registry` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.get() ``` #### Responses **200** The response will be a JSON object with the key registry containing information about your registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `registry` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the registry was created. `name` string optional Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string optional Example: `fra1` Slug of the region where registry data is stored `storage_usage_bytes` integer optional read-only Example: `29393920` The amount of storage used in the registry in bytes. `storage_usage_bytes_updated_at` string (date-time) optional read-only Example: `2020-11-04T21:39:49.530562231Z` The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. `subscription` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **412** There are more than one registries in the DO account. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "registry": { "created_at": "2020-03-21T16:02:37Z", "name": "example", "region": "fra1", "storage_usage_bytes": 29393920, "storage_usage_bytes_updated_at": "2020-11-04T21:39:49.530562231Z", "subscription": { "created_at": "2020-01-23T21:19:12Z", "updated_at": "2020-11-05T15:53:24Z" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **412** ```json { "id": "precondition_failed", "message": "This API is not supported if you have created multiple registries. Please use \n‘/v2/registries/{registry_name}’ instead. Refer to \nhttps://docs.digitalocean.com/reference/api/digitalocean/#tag/Container-Registry for more info." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Container Registry Deprecated `/v2/registry` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To create your container registry, send a POST request to `/v2/registry`. The `name` becomes part of the URL for images stored in the registry. For example, if your registry is called `example`, an image in it will have the URL `registry.digitalocean.com/example/image:tag`. #### Request Body: `application/json` `insights` object optional write-only Nullable An object specifying the Insights telemetry that the customer opts in to for the container registry. This is only accepted when creating a registry and is not returned in responses. If the object is omitted, or if `logs` is not set, the registry is created with logs not enabled. **Show child properties** `logs` boolean optional Example: `true` A boolean value indicating whether the registry's logs are sent to Insights. Set this to `true` to send the registry's logs to Insights. `false`, and omitting `insights` or `logs`, both create the registry with logs not enabled. `name` string required Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string, one of: nyc3, sfo3, ams3, sgp1, fra1 optional Example: `fra1` Slug of the region where registry data is stored. When not provided, a region will be selected. `subscription_tier_slug` string, one of: starter, basic, professional required Example: `basic` The slug of the subscription tier to sign up for. Valid values can be retrieved using the options endpoint. ##### Request: `/v2/registry` ### Payload Content type `application/json` ```json { "insights": { "logs": true }, "name": "example", "region": "fra1", "subscription_tier_slug": "basic" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example", "subscription_tier_slug": "basic", "region": "fra1"}' \ "https://api.digitalocean.com/v2/registry" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example", "subscription_tier_slug": "basic", "region": "fra1" } resp = client.registry.create(body=req) ``` #### Responses **201** The response will be a JSON object with the key registry containing information about your registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `registry` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-03-21T16:02:37Z` A time value given in ISO8601 combined date and time format that represents when the registry was created. `name` string optional Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. `region` string optional Example: `fra1` Slug of the region where registry data is stored `storage_usage_bytes` integer optional read-only Example: `29393920` The amount of storage used in the registry in bytes. `storage_usage_bytes_updated_at` string (date-time) optional read-only Example: `2020-11-04T21:39:49.530562231Z` The time at which the storage usage was updated. Storage usage is calculated asynchronously, and may not immediately reflect pushes to the registry. `subscription` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "registry": { "created_at": "2020-03-21T16:02:37Z", "name": "example", "region": "fra1", "storage_usage_bytes": 29393920, "storage_usage_bytes_updated_at": "2020-11-04T21:39:49.530562231Z", "subscription": { "created_at": "2020-01-23T21:19:12Z", "updated_at": "2020-11-05T15:53:24Z" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Deprecated `/v2/registry` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To delete your container registry, destroying all container image data stored in it, send a DELETE request to `/v2/registry`. This operation is not compatible with multiple registries in a DO account. You should use `/v2/registries/{registry_name}` instead. ##### Request: `/v2/registry` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.delete() ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **412** There are more than one registries in the DO account. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **412** ```json { "id": "precondition_failed", "message": "This API is not supported if you have created multiple registries. Please use \n‘/v2/registries/{registry_name}’ instead. Refer to \nhttps://docs.digitalocean.com/reference/api/digitalocean/#tag/Container-Registry for more info." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Subscription Deprecated `/v2/registry/subscription` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** A subscription is automatically created when you configure your container registry. To get information about your subscription, send a GET request to `/v2/registry/subscription`. ##### Request: `/v2/registry/subscription` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/subscription" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.get_subscription() ``` #### Responses **200** The response will be a JSON object with a key called subscription containing information about your subscription. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `subscription` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-01-23T21:19:12Z` The time at which the subscription was created. `tier` object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `updated_at` string (date-time) optional read-only Example: `2020-11-05T15:53:24Z` The time at which the subscription was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "subscription": { "created_at": "2020-01-23T21:19:12Z", "tier": { "allow_storage_overage": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic", "storage_overage_price_in_cents": 2 }, "updated_at": "2020-11-05T15:53:24Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Update Subscription Tier Deprecated `/v2/registry/subscription` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** After creating your registry, you can switch to a different subscription tier to better suit your needs. To do this, send a POST request to `/v2/registry/subscription`. #### Request Body: `application/json` `tier_slug` string, one of: starter, basic, professional optional Example: `basic` The slug of the subscription tier to sign up for. ##### Request: `/v2/registry/subscription` ### Payload Content type `application/json` ```json { "tier_slug": "basic" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tier_slug": "professional"}' \ "https://api.digitalocean.com/v2/registry/subscription" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "tier_slug": "basic" } resp = client.registry.update_subscription(body=req) ``` #### Responses **200** The response will be a JSON object with a key called subscription containing information about your subscription. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `subscription` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-01-23T21:19:12Z` The time at which the subscription was created. `tier` object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `updated_at` string (date-time) optional read-only Example: `2020-11-05T15:53:24Z` The time at which the subscription was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **412** There are more than one registries in the DO account. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "subscription": { "created_at": "2020-01-23T21:19:12Z", "tier": { "allow_storage_overage": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic", "storage_overage_price_in_cents": 2 }, "updated_at": "2020-11-05T15:53:24Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **412** ```json { "id": "precondition_failed", "message": "registry is not eligible for tier because: [OverRegistryLimit]" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Docker Credentials for Container Registry Deprecated `/v2/registry/docker-credentials` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** In order to access your container registry with the Docker client or from a Kubernetes cluster, you will need to configure authentication. The necessary JSON configuration can be retrieved by sending a GET request to `/v2/registry/docker-credentials`. The response will be in the format of a Docker `config.json` file. To use the config in your Kubernetes cluster, create a Secret with: ``` kubectl create secret generic docr \ --from-file=.dockerconfigjson=config.json \ --type=kubernetes.io/dockerconfigjson ``` By default, the returned credentials have read-only access to your registry and cannot be used to push images. This is appropriate for most Kubernetes clusters. To retrieve read/write credentials, suitable for use with the Docker client or in a CI system, read_write may be provided as query parameter. For example: `/v2/registry/docker-credentials?read_write=true` By default, the returned credentials will not expire. To retrieve credentials with an expiry set, expiry_seconds may be provided as a query parameter. For example: `/v2/registry/docker-credentials?expiry_seconds=3600` will return credentials that expire after one hour. #### Query Parameters `expiry_seconds` integer >= 0 optional Example: `3600` The duration in seconds that the returned registry credentials will be valid. If not set or 0, the credentials will not expire. Default: `0` `read_write` boolean optional Example: `true` By default, the registry credentials allow for read-only access. Set this query parameter to `true` to obtain read-write credentials. Default: `false` ##### Request: `/v2/registry/docker-credentials` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/docker-credentials" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.get_docker_credentials() ``` #### Responses **200** A Docker config.json file for the container registry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `auths` object optional **Show child properties** `registry.digitalocean.com` object optional **Show child properties** `auth` string optional Example: `YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK` A base64 encoded string containing credentials for the container registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "auths": { "registry.digitalocean.com": { "auth": "YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODI6YjdkMDNhNjk0N2IyMTdlZmI2ZjNlYzNiZDM1MDQ1ODIK" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Validate a Container Registry Name Deprecated `/v2/registry/validate-name` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To validate that a container registry name is available for use, send a POST request to `/v2/registry/validate-name`. If the name is both formatted correctly and available, the response code will be 204 and contain no body. If the name is already in use, the response will be a 409 Conflict. #### Request Body: `application/json` `name` string required Example: `example` A globally unique name for the container registry. Must be lowercase and be composed only of numbers, letters and `-`, up to a limit of 63 characters. ##### Request: `/v2/registry/validate-name` ### Payload Content type `application/json` ```json { "name": "example" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "example"}' \ "https://api.digitalocean.com/v2/registry/validate-name" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example" } resp = client.registry.validate_name(body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repositories Deprecated `/v2/registry/{registry_name}/repositories` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** This endpoint has been deprecated in favor of the *List All Container Registry Repositories \[V2]* endpoint. To list all repositories in your container registry, send a GET request to `/v2/registry/$REGISTRY_NAME/repositories`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registry/{registry_name}/repositories` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositories" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.list_repositories(registry_name="example") ``` #### Responses **200** The response body will be a JSON object with a key of repositories. This will be set to an array containing objects each representing a repository. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `repositories` array of object optional **Show child properties** `latest_tag` object optional **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the tag in bytes. `manifest_digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the manifest associated with the tag. `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available). `tag` string optional Example: `latest` The name of the tag. `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the tag was last updated. `name` string optional Example: `repo-1` The name of the repository. `registry_name` string optional Example: `example` The name of the container registry. `tag_count` integer optional Example: `1` The number of tags in the repository. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "meta": { "total": 1 }, "repositories": [ { "latest_tag": { "compressed_size_bytes": 2803255, "manifest_digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 5861888, "tag": "latest", "updated_at": "2020-04-09T23:54:25Z" }, "name": "repo-1", "registry_name": "example", "tag_count": 1 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repositories (V2) Deprecated `/v2/registry/{registry_name}/repositoriesV2` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To list all repositories in your container registry, send a GET request to `/v2/registry/$REGISTRY_NAME/repositoriesV2`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Ignored when 'page_token' is provided. Default: `1` `page_token` string optional Example: `eyJUb2tlbiI6IkNnZGpiMjlz` Token to retrieve of the next or previous set of results more quickly than using 'page'. ##### Request: `/v2/registry/{registry_name}/repositoriesV2` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page_size=1" ``` ### cURL (next page) ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=2&page_token=JPZmZzZXQiOjB9&per_page=1" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.list_repositories_v2(registry_name="example") ``` #### Responses **200** The response body will be a JSON object with a key of repositories. This will be set to an array containing objects each representing a repository. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `repositories` array of object optional **Show child properties** `latest_manifest` object optional **Show child properties** `blobs` array of object optional All blobs associated with this manifest **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the blob in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the blob `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the manifest in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available). `tags` array of string optional Example: `["latest","v1","v2"]` All tags associated with this manifest `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the manifest was last updated. `manifest_count` integer optional Example: `1` The number of manifests in the repository. `name` string optional Example: `repo-1` The name of the repository. `registry_name` string optional Example: `example` The name of the container registry. `tag_count` integer optional Example: `1` The number of tags in the repository. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "last": "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=5\u0026per_page=1", "next": "https://api.digitalocean.com/v2/registry/example/repositoriesV2?page=2\u0026page_token=JPZmZzZXQiOjB9\u0026per_page=1" } }, "meta": { "total": 5 }, "repositories": [ { "latest_manifest": { "blobs": [ { "compressed_size_bytes": 1471, "digest": "sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab" }, { "compressed_size_byte": 2814446, "digest": "sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e" }, { "compressed_size_bytes": 528, "digest": "sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a" } ], "compressed_size_bytes": 1972332, "digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 2816445, "tags": [ "v1", "v2" ], "updated_at": "2021-04-09T23:54:25Z" }, "manifest_count": 82, "name": "repo-1", "registry_name": "example", "tag_count": 57 } ] } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repository Tags Deprecated `/v2/registry/{registry_name}/repositories/{repository_name}/tags` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To list all tags in your container registry repository, send a GET request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to list tags for `registry.digitalocean.com/example/my/repo`, the path would be `/v2/registry/example/repositories/my%2Frepo/tags`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registry/{registry_name}/repositories/{repository_name}/tags` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/tags" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.list_repository_tags(registry_name="example", repository_name="repo01") ``` #### Responses **200** The response body will be a JSON object with a key of tags. This will be set to an array containing objects each representing a tag. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `tags` array of object optional **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the tag in bytes. `manifest_digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the manifest associated with the tag. `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the tag in bytes (this size is calculated asynchronously so it may not be immediately available). `tag` string optional Example: `latest` The name of the tag. `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the tag was last updated. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "meta": { "total": 1 }, "tags": [ { "compressed_size_bytes": 2803255, "manifest_digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 5861888, "tag": "latest", "updated_at": "2020-04-09T23:54:25Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Repository Tag Deprecated `/v2/registry/{registry_name}/repositories/{repository_name}/tags/{repository_tag}` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To delete a container repository tag, send a DELETE request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/tags/$TAG`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to delete `registry.digitalocean.com/example/my/repo:mytag`, the path would be `/v2/registry/example/repositories/my%2Frepo/tags/mytag`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. `repository_tag` string required Example: `06a447a` The name of a container registry repository tag. ##### Request: `/v2/registry/{registry_name}/repositories/{repository_name}/tags/{repository_tag}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/tags/mytag" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.delete_repository_tag(registry_name="example", repository_name="repo-1", repository_tag="06a447a") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Container Registry Repository Manifests Deprecated `/v2/registry/{registry_name}/repositories/{repository_name}/digests` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To list all manifests in your container registry repository, send a GET request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to list manifests for `registry.digitalocean.com/example/my/repo`, the path would be `/v2/registry/example/repositories/my%2Frepo/digests`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registry/{registry_name}/repositories/{repository_name}/digests` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.list_repository_manifests(registry_name="example", repository_name="repo01") ``` #### Responses **200** The response body will be a JSON object with a key of manifests. This will be set to an array containing objects each representing a manifest. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `manifests` array of object optional **Show child properties** `blobs` array of object optional All blobs associated with this manifest **Show child properties** `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the blob in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The digest of the blob `compressed_size_bytes` integer optional Example: `2803255` The compressed size of the manifest in bytes. `digest` string optional Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest `registry_name` string optional Example: `example` The name of the container registry. `repository` string optional Example: `repo-1` The name of the repository. `size_bytes` integer optional Example: `5861888` The uncompressed size of the manifest in bytes (this size is calculated asynchronously so it may not be immediately available). `tags` array of string optional Example: `["latest","v1","v2"]` All tags associated with this manifest `updated_at` string (date-time) optional Example: `2020-04-09T23:54:25Z` The time the manifest was last updated. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1\u0026per_page=1", "last": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3\u0026per_page=1", "next": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=3\u0026per_page=1", "prev": "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests?page=1\u0026per_page=1" } }, "manifests": [ { "blobs": [ { "compressed_size_bytes": 1471, "digest": "sha256:14119a10abf4669e8cdbdff324a9f9605d99697215a0d21c360fe8dfa8471bab" }, { "compressed_size_byte": 2814446, "digest": "sha256:a0d0a0d46f8b52473982a3c466318f479767577551a53ffc9074c9fa7035982e" }, { "compressed_size_bytes": 528, "digest": "sha256:69704ef328d05a9f806b6b8502915e6a0a4faa4d72018dc42343f511490daf8a" } ], "compressed_size_bytes": 1972332, "digest": "sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221", "registry_name": "example", "repository": "repo-1", "size_bytes": 2816445, "tags": [ "v1", "v2" ], "updated_at": "2021-04-09T23:54:25Z" } ], "meta": { "total": 3 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Container Registry Repository Manifest Deprecated `/v2/registry/{registry_name}/repositories/{repository_name}/digests/{manifest_digest}` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To delete a container repository manifest by digest, send a DELETE request to `/v2/registry/$REGISTRY_NAME/repositories/$REPOSITORY_NAME/digests/$MANIFEST_DIGEST`. Note that if your repository name contains `/` characters, it must be URL-encoded in the request URL. For example, to delete `registry.digitalocean.com/example/my/repo@sha256:abcd`, the path would be `/v2/registry/example/repositories/my%2Frepo/digests/sha256:abcd`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `repository_name` string required Example: `repo-1` The name of a container registry repository. If the name contains `/` characters, they must be URL-encoded, e.g. `%2F`. `manifest_digest` string required Example: `sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221` The manifest digest of a container registry repository tag. ##### Request: `/v2/registry/{registry_name}/repositories/{repository_name}/digests/{manifest_digest}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/repositories/repo-1/digests/sha256:cb8a924afdf0229ef7515d9e5b3024e23b3eb03ddbba287f4a19c6ac90b8d221" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.delete_repository_manifest(registry_name="example", repository_name="repo-1", manifest_digest="sha256:cb8a924afd") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Active Garbage Collection Deprecated `/v2/registry/{registry_name}/garbage-collection` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To get information about the currently-active garbage collection for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collection`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. ##### Request: `/v2/registry/{registry_name}/garbage-collection` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/garbage-collection" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.get_garbage_collection(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Start Garbage Collection Deprecated `/v2/registry/{registry_name}/garbage-collection` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** Garbage collection enables users to clear out unreferenced blobs (layer & manifest data) after deleting one or more manifests from a repository. If there are no unreferenced blobs resulting from the deletion of one or more manifests, garbage collection is effectively a noop. [See here for more information](https://docs.digitalocean.com/products/container-registry/how-to/clean-up-container-registry/index.html.md) about how and why you should clean up your container registry periodically. To request a garbage collection run on your registry, send a POST request to `/v2/registry/$REGISTRY_NAME/garbage-collection`. This will initiate the following sequence of events on your registry. - Set the registry to read-only mode, meaning no further write-scoped JWTs will be issued to registry clients. Existing write-scoped JWTs will continue to work until they expire which can take up to 15 minutes. - Wait until all existing write-scoped JWTs have expired. - Scan all registry manifests to determine which blobs are unreferenced. - Delete all unreferenced blobs from the registry. - Record the number of blobs deleted and bytes freed, mark the garbage collection status as `success`. - Remove the read-only mode restriction from the registry, meaning write-scoped JWTs will once again be issued to registry clients. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Request Body: `application/json` `type` string, one of: untagged manifests only, unreferenced blobs only, untagged manifests and unreferenced blobs optional Example: `unreferenced blobs only` Type of the garbage collection to run against this registry ##### Request: `/v2/registry/{registry_name}/garbage-collection` ### Payload Content type `application/json` ```json { "type": "unreferenced blobs only" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{ "type": "unreferenced blobs only"}' \ "https://api.digitalocean.com/v2/registry/example/garbage-collection" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "unreferenced blobs only" } resp = client.registry.run_garbage_collection(registry_name="example",body=req) ``` #### Responses **201** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Garbage Collections Deprecated `/v2/registry/{registry_name}/garbage-collections` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To get information about past garbage collections for a registry, send a GET request to `/v2/registry/$REGISTRY_NAME/garbage-collections`. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/registry/{registry_name}/garbage-collections` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/garbage-collections" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.list_garbage_collections(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collections. This will be set to an array containing objects representing each past garbage collection. Each will contain the standard Garbage Collection attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collections` array of object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collections": [ { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24.000Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44.000Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } ], "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Garbage Collection Deprecated `/v2/registry/{registry_name}/garbage-collection/{garbage_collection_uuid}` **Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** To cancel the currently-active garbage collection for a registry, send a PUT request to `/v2/registry/$REGISTRY_NAME/garbage-collection/$GC_UUID` and specify one or more of the attributes below. #### Path Parameters `registry_name` string required Example: `example` The name of a container registry. `garbage_collection_uuid` string required Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` The UUID of a garbage collection run. #### Request Body: `application/json` `cancel` boolean optional Example: `true` A boolean value indicating that the garbage collection should be cancelled. ##### Request: `/v2/registry/{registry_name}/garbage-collection/{garbage_collection_uuid}` ### Payload Content type `application/json` ```json { "cancel": true } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/example/garbage-collection/example-gc-uuid" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.run_garbage_collection(registry_name="example") ``` #### Responses **200** The response will be a JSON object with a key of garbage_collection. This will be a json object with attributes representing the currently-active garbage collection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `garbage_collection` object optional **Show child properties** `blobs_deleted` integer optional Example: `42` The number of blobs deleted as a result of this garbage collection. `created_at` string (date-time) optional Example: `2020-10-30T21:03:24Z` The time the garbage collection was created. `freed_bytes` integer optional Example: `667` The number of bytes freed as a result of this garbage collection. `registry_name` string optional Example: `example` The name of the container registry. `status` string (enum) optional Example: `requested` The current status of this garbage collection. `updated_at` string (date-time) optional Example: `2020-10-30T21:03:44Z` The time the garbage collection was last updated. `uuid` string optional Example: `eff0feee-49c7-4e8f-ba5c-a320c109c8a8` A string specifying the UUID of the garbage collection. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "garbage_collection": { "blobs_deleted": 42, "created_at": "2020-10-30T21:03:24Z", "freed_bytes": 667, "registry_name": "example", "status": "requested", "updated_at": "2020-10-30T21:03:44Z", "uuid": "eff0feee-49c7-4e8f-ba5c-a320c109c8a8" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Registry Options (Subscription Tiers and Available Regions) Deprecated `/v2/registry/options` \*\*Note: This endpoint is deprecated and may be removed in a future version. There is no alternative.\*\***Note: This endpoint is deprecated. Please use the `/v2/registries` endpoint instead.** This endpoint serves to provide additional information as to which option values are available when creating a container registry. There are multiple subscription tiers available for container registry. Each tier allows a different number of image repositories to be created in your registry, and has a different amount of storage and transfer included. There are multiple regions available for container registry and controls where your data is stored. To list the available options, send a GET request to `/v2/registry/options`. ##### Request: `/v2/registry/options` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/registry/options" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.registry.get_options() ``` #### Responses **200** The response will be a JSON object with a key called options which contains a key called subscription_tiers listing the available tiers. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `options` object optional **Show child properties** `available_regions` array of string optional Example: `["nyc3"]` `subscription_tiers` array of object optional **Show child properties** `allow_storage_overage` boolean optional Example: `true` A boolean indicating whether the subscription tier supports additional storage above what is included in the base plan at an additional cost per GiB used. `included_bandwidth_bytes` integer optional Example: `5368709120` The amount of outbound data transfer included in the subscription tier in bytes. `included_repositories` integer optional Example: `5` The number of repositories included in the subscription tier. `0` indicates that the subscription tier includes unlimited repositories. `included_storage_bytes` integer optional Example: `5368709120` The amount of storage included in the subscription tier in bytes. `monthly_price_in_cents` integer optional Example: `500` The monthly cost of the subscription tier in cents. `name` string optional Example: `Basic` The name of the subscription tier. `slug` string optional Example: `basic` The slug identifier of the subscription tier. `storage_overage_price_in_cents` integer optional Example: `2` The price paid in cents per GiB for additional storage beyond what is included in the subscription plan. `eligibility_reasons` array of string, one of: OverRepositoryLimit, OverStorageLimit optional Example: `["OverRepositoryLimit"]` If your account is not eligible to use a certain subscription tier, this will include a list of reasons that prevent you from using the tier. `eligible` boolean optional Example: `true` A boolean indicating whether your account it eligible to use a certain subscription tier. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "options": { "available_regions": [ "nyc3", "sfo3", "ams3", "sgp1", "fra1" ], "subscription_tiers": [ { "allow_storage_overage": false, "eligibility_reasons": [ "OverRepositoryLimit" ], "eligible": false, "included_bandwidth_bytes": 524288000, "included_repositories": 1, "included_storage_bytes": 524288000, "monthly_price_in_cents": 0, "name": "Starter", "slug": "starter" }, { "allow_storage_overage": true, "eligible": true, "included_bandwidth_bytes": 5368709120, "included_repositories": 5, "included_storage_bytes": 5368709120, "monthly_price_in_cents": 500, "name": "Basic", "slug": "basic" }, { "allow_storage_overage": true, "eligible": true, "included_bandwidth_bytes": 107374182400, "included_repositories": 0, "included_storage_bytes": 107374182400, "monthly_price_in_cents": 2000, "name": "Professional", "slug": "professional" } ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Container Registry Quickstart](https://docs.digitalocean.com/products/container-registry/getting-started/quickstart/index.html.md), [How to Free Up Space in Your Container Registry](https://docs.digitalocean.com/products/container-registry/how-to/clean-up-container-registry/index.html.md), [How to Use Your Private DigitalOcean Container Registry with Docker and Kubernetes](https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/databases/ --- title: Databases description: DigitalOcean's [managed database service](https://docs.digitalocean.com/products/databases) simplifies the creation and management of highly available … product: Reference url: https://docs.digitalocean.com/reference/api/reference/databases/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Databases Generated on 4 Dec 2026 DigitalOcean's [managed database service](https://docs.digitalocean.com/products/databases) simplifies the creation and management of highly available database clusters. Currently, it offers support for [PostgreSQL](http://docs.digitalocean.com/products/databases/postgresql/), [Caching](https://docs.digitalocean.com/products/databases/redis/index.html.md), [Valkey](https://docs.digitalocean.com/products/databases/valkey/index.html.md), [MySQL](https://docs.digitalocean.com/products/databases/mysql/index.html.md), [MongoDB](https://docs.digitalocean.com/products/databases/mongodb/index.html.md), and [OpenSearch](https://docs.digitalocean.com/products/databases/opensearch/index.html.md). By sending requests to the `/v2/databases` endpoint, you can list, create, or delete database clusters as well as scale the size of a cluster, add or remove read-only replicas, and manage other configuration details. Database clusters may be deployed in a multi-node, high-availability configuration. If your machine type is above the basic nodes, your node plan is above the smallest option, or you are running MongoDB, you may additionally include up to two standby nodes in your cluster. The size of individual nodes in a database cluster is represented by a human-readable slug, which is used in some of the following requests. Each slug denotes the node's identifier, CPU count, and amount of RAM, in that order. For a list of currently available database slugs and options, use the `/v2/databases/options` endpoint or use the `doctl databases options` [command](https://docs.digitalocean.com/reference/doctl/reference/databases/options). Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List Database Options](#databases_list_options) - **GET** [List All Database Clusters](#databases_list_clusters) - **POST** [Create a New Database Cluster](#databases_create_cluster) - **GET** [Retrieve an Existing Database Cluster](#databases_get_cluster) - **DELETE** [Destroy a Database Cluster](#databases_destroy_cluster) - **GET** [Retrieve an Existing Database Cluster Configuration](#databases_get_config) - **PATCH** [Update the Database Configuration for an Existing Database](#databases_patch_config) - **GET** [Retrieve the Public Certificate](#databases_get_ca) - **GET** [Retrieve the Status of an Online Migration](#databases_get_migrationStatus) - **PUT** [Start an Online Migration](#databases_update_onlineMigration) - **DELETE** [Stop an Online Migration](#databases_delete_onlineMigration) - **PUT** [Migrate a Database Cluster to a New Region](#databases_update_region) - **PUT** [Resize a Database Cluster](#databases_update_clusterSize) - **GET** [List Firewall Rules (Trusted Sources) for a Database Cluster](#databases_list_firewall_rules) - **PUT** [Update Firewall Rules (Trusted Sources) for a Database](#databases_update_firewall_rules) - **GET** [Retrieve DO Settings for a Database Cluster](#databases_get_do_settings) - **PUT** [Update DO Settings for a Database Cluster](#databases_update_do_settings) - **PUT** [Configure a Database Cluster's Maintenance Window](#databases_update_maintenanceWindow) - **PUT** [Start Database Maintenance](#databases_install_update) - **GET** [List Backups for a Database Cluster](#databases_list_backups) - **GET** [List All Read-only Replicas](#databases_list_replicas) - **POST** [Create a Read-only Replica](#databases_create_replica) - **GET** [List all Events Logs](#databases_list_events_logs) - **GET** [Retrieve an Existing Read-only Replica](#databases_get_replica) - **DELETE** [Destroy a Read-only Replica](#databases_destroy_replica) - **PUT** [Promote a Read-only Replica to become a Primary Cluster](#databases_promote_replica) - **GET** [List all Database Users](#databases_list_users) - **POST** [Add a Database User](#databases_add_user) - **GET** [Retrieve an Existing Database User](#databases_get_user) - **PUT** [Update a Database User](#databases_update_user) - **DELETE** [Remove a Database User](#databases_delete_user) - **POST** [Reset a Database User's Password or Authentication Method](#databases_reset_auth) - **GET** [List All Databases](#databases_list) - **POST** [Add a New Database](#databases_add) - **GET** [Retrieve an Existing Database](#databases_get) - **DELETE** [Delete a Database](#databases_delete) - **GET** [List Connection Pools (PostgreSQL)](#databases_list_connectionPools) - **POST** [Add a New Connection Pool (PostgreSQL)](#databases_add_connectionPool) - **GET** [Retrieve Existing Connection Pool (PostgreSQL)](#databases_get_connectionPool) - **PUT** [Update Connection Pools (PostgreSQL)](#databases_update_connectionPool) - **DELETE** [Delete a Connection Pool (PostgreSQL)](#databases_delete_connectionPool) - **GET** [Retrieve the Eviction Policy for a Caching or Valkey Cluster](#databases_get_evictionPolicy) - **PUT** [Configure the Eviction Policy for a Caching or Valkey Cluster](#databases_update_evictionPolicy) - **GET** [Retrieve the SQL Modes for a MySQL Cluster](#databases_get_sql_mode) - **PUT** [Update SQL Mode for a Cluster](#databases_update_sql_mode) - **PUT** [Upgrade Major Version for a Database](#databases_update_major_version) - **GET** [Retrieve Autoscale Configuration for a Database Cluster](#databases_get_autoscale) - **PUT** [Configure Autoscale Settings for a Database Cluster](#databases_update_autoscale) - **GET** [List Topics for a Kafka Cluster](#databases_list_kafka_topics) - **POST** [Create Topic for a Kafka Cluster](#databases_create_kafka_topic) - **GET** [Get Topic for a Kafka Cluster](#databases_get_kafka_topic) - **PUT** [Update Topic for a Kafka Cluster](#databases_update_kafka_topic) - **DELETE** [Delete Topic for a Kafka Cluster](#databases_delete_kafka_topic) - **GET** [List Logsinks for a Database Cluster](#databases_list_logsink) - **POST** [Create Logsink for a Database Cluster](#databases_create_logsink) - **GET** [Get Logsink for a Database Cluster](#databases_get_logsink) - **PUT** [Update Logsink for a Database Cluster](#databases_update_logsink) - **DELETE** [Delete Logsink for a Database Cluster](#databases_delete_logsink) - **GET** [List Schemas for Kafka Cluster](#databases_list_kafka_schemas) - **POST** [Create Schema Registry for Kafka Cluster](#databases_create_kafka_schema) - **GET** [Get a Kafka Schema by Subject Name](#databases_get_kafka_schema) - **DELETE** [Delete a Kafka Schema by Subject Name](#databases_delete_kafka_schema) - **GET** [Get Kafka Schema by Subject Version](#databases_get_kafka_schema_version) - **GET** [Retrieve Schema Registry Configuration for a kafka Cluster](#databases_get_kafka_schema_config) - **PUT** [Update Schema Registry Configuration for a kafka Cluster](#databases_update_kafka_schema_config) - **GET** [Retrieve Schema Registry Configuration for a Subject of kafka Cluster](#databases_get_kafka_schema_subject_config) - **PUT** [Update Schema Registry Configuration for a Subject of kafka Cluster](#databases_update_kafka_schema_subject_config) - **GET** [Retrieve Database Clusters' Metrics Endpoint Credentials](#databases_get_cluster_metrics_credentials) - **PUT** [Update Database Clusters' Metrics Endpoint Credentials](#databases_update_cluster_metrics_credentials) - **GET** [List Indexes for a OpenSearch Cluster](#databases_list_opeasearch_indexes) - **DELETE** [Delete Index for OpenSearch Cluster](#databases_delete_opensearch_index) ## GET List Database Options `/v2/databases/options` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: database:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the options available for the offered database engines, send a GET request to `/v2/databases/options`. The result will be a JSON object with an `options` key. ##### Request: `/v2/databases/options` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/options" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() options, _, err := client.Databases.ListOptions(ctx) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_options() ``` #### Responses **200** A JSON string with a key of options. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `options` object optional **Show child properties** `advanced_mysql` object optional `advanced_pg` object optional `kafka` object optional `mongodb` object optional `mysql` object optional `opensearch` object optional `pg` object optional `redis` object optional `valkey` object optional `version_availability` object optional **Show child properties** `advanced_mysql` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `advanced_pg` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `kafka` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `mongodb` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `mysql` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `opensearch` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `pg` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `redis` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. `valkey` array of object optional An array of objects, each indicating the version end-of-life, end-of-availability for various database engines **Show child properties** `end_of_availability` string optional Nullable Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `end_of_life` string optional Nullable Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `version` string optional Example: `8` The engine version. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "options": { "advanced_mysql": { "default_version": "8.4.8", "layouts": [ { "num_nodes": 1, "sizes": [ "gd-2vcpu-8gb-intel", "so1_5-2vcpu-16gb-intel", "so1_5-2vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb-intel", "so1_5-4vcpu-32gb-intel", "so1_5-4vcpu-32gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "so1_5-8vcpu-64gb", "gd-8vcpu-32gb-intel", "so1_5-8vcpu-64gb-intel", "gd-16vcpu-64gb", "so1_5-16vcpu-128gb", "gd-16vcpu-64gb-intel", "so1_5-16vcpu-128gb-intel", "so1_5-24vcpu-192gb", "so1_5-24vcpu-192gb-intel", "so1_5-32vcpu-256gb-intel", "gd-32vcpu-128gb", "gd-32vcpu-128gb-intel", "so1_5-32vcpu-256gb", "gd-40vcpu-160gb", "so1_5-48vcpu-384gb-intel", "gd-48vcpu-192gb-intel", "so1_5-48vcpu-256gb", "c-96-intel" ] }, { "num_nodes": 3, "sizes": [ "gd-2vcpu-8gb-intel", "so1_5-2vcpu-16gb-intel", "so1_5-2vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb-intel", "so1_5-4vcpu-32gb-intel", "so1_5-4vcpu-32gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "so1_5-8vcpu-64gb", "gd-8vcpu-32gb-intel", "so1_5-8vcpu-64gb-intel", "gd-16vcpu-64gb", "so1_5-16vcpu-128gb", "gd-16vcpu-64gb-intel", "so1_5-16vcpu-128gb-intel", "so1_5-24vcpu-192gb", "so1_5-24vcpu-192gb-intel", "so1_5-32vcpu-256gb-intel", "gd-32vcpu-128gb", "gd-32vcpu-128gb-intel", "so1_5-32vcpu-256gb", "gd-40vcpu-160gb", "so1_5-48vcpu-384gb-intel", "gd-48vcpu-192gb-intel", "so1_5-48vcpu-256gb", "c-96-intel" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "8.4.8" ] }, "advanced_pg": { "default_version": "18", "layouts": [ { "num_nodes": 1, "sizes": [ "gd-2vcpu-8gb-intel", "so1_5-2vcpu-16gb-intel", "so1_5-2vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb-intel", "so1_5-4vcpu-32gb-intel", "so1_5-4vcpu-32gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "so1_5-8vcpu-64gb", "gd-8vcpu-32gb-intel", "so1_5-8vcpu-64gb-intel", "gd-16vcpu-64gb", "so1_5-16vcpu-128gb", "gd-16vcpu-64gb-intel", "so1_5-16vcpu-128gb-intel", "so1_5-24vcpu-192gb", "so1_5-24vcpu-192gb-intel", "so1_5-32vcpu-256gb-intel", "gd-32vcpu-128gb", "gd-32vcpu-128gb-intel", "so1_5-32vcpu-256gb", "gd-40vcpu-160gb", "so1_5-48vcpu-384gb-intel", "gd-48vcpu-192gb-intel", "so1_5-48vcpu-256gb", "c-96-intel" ] }, { "num_nodes": 2, "sizes": [ "gd-2vcpu-8gb-intel", "so1_5-2vcpu-16gb-intel", "so1_5-2vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb-intel", "so1_5-4vcpu-32gb-intel", "so1_5-4vcpu-32gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "so1_5-8vcpu-64gb", "gd-8vcpu-32gb-intel", "so1_5-8vcpu-64gb-intel", "gd-16vcpu-64gb", "so1_5-16vcpu-128gb", "gd-16vcpu-64gb-intel", "so1_5-16vcpu-128gb-intel", "so1_5-24vcpu-192gb", "so1_5-24vcpu-192gb-intel", "so1_5-32vcpu-256gb-intel", "gd-32vcpu-128gb", "gd-32vcpu-128gb-intel", "so1_5-32vcpu-256gb", "gd-40vcpu-160gb", "so1_5-48vcpu-384gb-intel", "gd-48vcpu-192gb-intel", "so1_5-48vcpu-256gb", "c-96-intel" ] }, { "num_nodes": 3, "sizes": [ "gd-2vcpu-8gb-intel", "so1_5-2vcpu-16gb-intel", "so1_5-2vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb-intel", "so1_5-4vcpu-32gb-intel", "so1_5-4vcpu-32gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "so1_5-8vcpu-64gb", "gd-8vcpu-32gb-intel", "so1_5-8vcpu-64gb-intel", "gd-16vcpu-64gb", "so1_5-16vcpu-128gb", "gd-16vcpu-64gb-intel", "so1_5-16vcpu-128gb-intel", "so1_5-24vcpu-192gb", "so1_5-24vcpu-192gb-intel", "so1_5-32vcpu-256gb-intel", "gd-32vcpu-128gb", "gd-32vcpu-128gb-intel", "so1_5-32vcpu-256gb", "gd-40vcpu-160gb", "so1_5-48vcpu-384gb-intel", "gd-48vcpu-192gb-intel", "so1_5-48vcpu-256gb", "c-96-intel" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "16", "17", "18" ] }, "kafka": { "default_version": "3.8", "layouts": [ { "num_nodes": 3, "sizes": [ "gd-2vcpu-8gb", "gd-4vcpu-16gb", "db-s-2vcpu-4gb", "db-s-2vcpu-2gb" ] }, { "num_nodes": 6, "sizes": [ "gd-2vcpu-8gb", "gd-4vcpu-16gb" ] }, { "num_nodes": 9, "sizes": [ "gd-2vcpu-8gb", "gd-4vcpu-16gb" ] }, { "num_nodes": 15, "sizes": [ "gd-2vcpu-8gb", "gd-4vcpu-16gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "3.8" ] }, "mongodb": { "default_version": "7.0", "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "6.0", "7.0" ] }, "mysql": { "default_version": "8", "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-1gb", "db-amd-1vcpu-1gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-amd-2vcpu-8gb", "db-intel-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-amd-4vcpu-16gb", "db-intel-4vcpu-16gb", "db-intel-8vcpu-32gb", "db-amd-8vcpu-32gb", "db-intel-16vcpu-64gb", "db-amd-16vcpu-64gb" ] }, { "num_nodes": 2, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-intel-2vcpu-8gb", "db-amd-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-intel-4vcpu-16gb", "db-amd-4vcpu-16gb", "db-amd-8vcpu-32gb", "db-intel-8vcpu-32gb", "db-amd-16vcpu-64gb", "db-intel-16vcpu-64gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-intel-2vcpu-8gb", "db-amd-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-intel-4vcpu-16gb", "db-amd-4vcpu-16gb", "db-amd-8vcpu-32gb", "db-intel-8vcpu-32gb", "db-amd-16vcpu-64gb", "db-intel-16vcpu-64gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "8" ] }, "opensearch": { "default_version": "2", "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "gd-2vcpu-8gb", "m3-2vcpu-16gb", "db-s-4vcpu-8gb", "gd-4vcpu-16gb", "m3-4vcpu-32gb", "m3-8vcpu-64gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-2vcpu-4gb", "gd-2vcpu-8gb", "m3-2vcpu-16gb", "db-s-4vcpu-8gb", "gd-4vcpu-16gb", "m3-4vcpu-32gb", "m3-8vcpu-64gb" ] }, { "num_nodes": 6, "sizes": [ "gd-2vcpu-8gb", "m3-2vcpu-16gb", "gd-4vcpu-16gb", "m3-4vcpu-32gb", "m3-8vcpu-64gb" ] }, { "num_nodes": 9, "sizes": [ "gd-2vcpu-8gb", "m3-2vcpu-16gb", "gd-4vcpu-16gb", "m3-4vcpu-32gb", "m3-8vcpu-64gb" ] }, { "num_nodes": 15, "sizes": [ "gd-2vcpu-8gb", "m3-2vcpu-16gb", "gd-4vcpu-16gb", "m3-4vcpu-32gb", "m3-8vcpu-64gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "1", "2" ] }, "pg": { "default_version": "17", "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-1gb", "db-amd-1vcpu-1gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-amd-2vcpu-8gb", "db-intel-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-amd-4vcpu-16gb", "db-intel-4vcpu-16gb", "db-intel-8vcpu-32gb", "db-amd-8vcpu-32gb", "db-intel-16vcpu-64gb", "db-amd-16vcpu-64gb" ] }, { "num_nodes": 2, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-intel-2vcpu-8gb", "db-amd-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-intel-4vcpu-16gb", "db-amd-4vcpu-16gb", "db-amd-8vcpu-32gb", "db-intel-8vcpu-32gb", "db-amd-16vcpu-64gb", "db-intel-16vcpu-64gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "gd-2vcpu-8gb", "gd-4vcpu-16gb", "gd-8vcpu-32gb", "gd-16vcpu-64gb", "gd-32vcpu-128gb", "gd-40vcpu-160gb", "so1_5-2vcpu-16gb", "so1_5-4vcpu-32gb", "so1_5-8vcpu-64gb", "so1_5-16vcpu-128gb", "so1_5-24vcpu-192gb", "so1_5-32vcpu-256gb", "db-intel-1vcpu-2gb", "db-amd-1vcpu-2gb", "db-amd-2vcpu-4gb", "db-intel-2vcpu-4gb", "db-intel-2vcpu-8gb", "db-amd-2vcpu-8gb", "db-intel-4vcpu-8gb", "db-amd-4vcpu-8gb", "db-intel-4vcpu-16gb", "db-amd-4vcpu-16gb", "db-amd-8vcpu-32gb", "db-intel-8vcpu-32gb", "db-amd-16vcpu-64gb", "db-intel-16vcpu-64gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "13", "14", "15", "16", "17" ] }, "redis": { "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] }, { "num_nodes": 2, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "7" ] }, "valkey": { "default_version": "8", "layouts": [ { "num_nodes": 1, "sizes": [ "db-s-1vcpu-1gb", "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] }, { "num_nodes": 2, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] }, { "num_nodes": 3, "sizes": [ "db-s-1vcpu-2gb", "db-s-2vcpu-4gb", "db-s-4vcpu-8gb", "db-s-6vcpu-16gb", "db-s-8vcpu-32gb", "db-s-16vcpu-64gb", "m-2vcpu-16gb", "m-4vcpu-32gb", "m-8vcpu-64gb", "m-16vcpu-128gb", "m-24vcpu-192gb", "m-32vcpu-256gb" ] } ], "regions": [ "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc3", "sfo2", "sfo3", "sgp1", "syd1", "tor1", "ric1", "atl1" ], "versions": [ "8" ] } }, "version_availability": { "advanced_mysql": [ { "default": true, "end_of_availability": null, "end_of_life": null, "version": "8.4.8" } ], "advanced_pg": [ { "default": false, "end_of_availability": "2028-05-09T00:00:00Z", "end_of_life": "2028-11-09T00:00:00Z", "version": "16" }, { "default": false, "end_of_availability": "2029-05-08T00:00:00Z", "end_of_life": "2029-11-08T00:00:00Z", "version": "17" }, { "default": true, "end_of_availability": "2030-05-13T00:00:00Z", "end_of_life": "2030-11-13T00:00:00Z", "version": "18" } ], "kafka": [ { "default": true, "end_of_availability": "2025-06-03T00:00:00Z", "end_of_life": null, "version": "3.8" } ], "mongodb": [ { "default": false, "end_of_availability": null, "end_of_life": "2025-07-01T07:00:00Z", "version": "6.0" }, { "default": true, "end_of_availability": null, "end_of_life": "2026-08-01T07:00:00Z", "version": "7.0" } ], "mysql": [ { "default": true, "end_of_availability": null, "end_of_life": null, "version": "8" } ], "opensearch": [ { "default": false, "end_of_availability": null, "end_of_life": null, "version": "1" }, { "default": true, "end_of_availability": null, "end_of_life": null, "version": "2" } ], "pg": [ { "default": false, "end_of_availability": "2025-05-13T00:00:00Z", "end_of_life": "2025-11-13T00:00:00Z", "version": "13" }, { "default": false, "end_of_availability": "2026-05-12T00:00:00Z", "end_of_life": "2026-11-12T00:00:00Z", "version": "14" }, { "default": false, "end_of_availability": "2027-05-12T00:00:00Z", "end_of_life": "2027-11-11T00:00:00Z", "version": "15" }, { "default": false, "end_of_availability": "2028-05-09T00:00:00Z", "end_of_life": "2028-11-09T00:00:00Z", "version": "16" }, { "default": true, "end_of_availability": "2029-05-08T00:00:00Z", "end_of_life": "2029-11-08T00:00:00Z", "version": "17" } ], "redis": [ { "default": true, "end_of_availability": "2025-04-30T00:00:00Z", "end_of_life": "2025-06-30T00:00:00Z", "version": "7" } ], "valkey": [ { "default": true, "end_of_availability": null, "end_of_life": null, "version": "8" } ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Database Clusters `/v2/databases` To list all of the database clusters available on your account, send a GET request to `/v2/databases`. To limit the results to database clusters with a specific tag, include the `tag_name` query parameter set to the name of the tag. For example, `/v2/databases?tag_name=$TAG_NAME`. The result will be a JSON object with a `databases` key. This will be set to an array of database objects, each of which will contain the standard database attributes. The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects will contain the information needed to connect to the cluster's standby node(s). The embedded `maintenance_window` object will contain information about any scheduled maintenance for the database cluster. #### Query Parameters `tag_name` string optional Example: `production` Limits the results to database clusters with a specific tag. Requires `tag:read` scope. ##### Request: `/v2/databases` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } clusters, _, err := client.Databases.List(ctx, opt) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_clusters(tag_name="production") ``` #### Responses **200** A JSON object with a key of databases. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `databases` array of object optional **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `db_names` array of string optional read-only Nullable Example: `["doadmin"]` An array of strings containing the names of databases created in the database cluster. `do_settings` object optional `engine` string (enum) required Example: `mysql` A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition engines are currently in public preview. `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database cluster. `maintenance_window` object optional `metrics_endpoints` array of object optional read-only Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s). **Show child properties** `host` string optional read-only Example: `db.example.com` A FQDN pointing to the database cluster's node(s). `port` integer optional read-only Example: `9273` The port on which a service is listening. `name` string required Example: `backend` A unique, human-readable name referring to a database cluster. `num_nodes` integer required Example: `2` The number of nodes in the database cluster. `private_connection` object optional `private_network_uuid` string optional Example: `d455e75d-4858-4eec-8c95-da2f0a5f93a7` A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `project_id` string (uuid) optional Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. Requires `project:read` scope. `region` string required Example: `nyc3` The slug identifier for the region where the database cluster is located. `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. `schema_registry_connection` object optional The connection details for Schema Registry. `semantic_version` string optional read-only Example: `8.0.28` A string representing the semantic version of the database engine in use for the cluster. `size` string required Example: `db-s-2vcpu-4gb` The slug identifier representing the size of the nodes in the database cluster. `standby_connection` object optional `standby_private_connection` object optional `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Nullable Example: `["production"]` An array of tags that have been applied to the database cluster. Requires `tag:read` scope. `ui_connection` object optional The connection details for OpenSearch dashboard. `users` array of object optional read-only Nullable **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. `version` string optional Example: `8` A string representing the version of the database engine in use for the cluster. `version_end_of_availability` string optional read-only Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `version_end_of_life` string optional read-only Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "databases": [ { "connection": { "database": "", "host": "db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "db_names": [ "defaultdb" ], "engine": "pg", "id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "maintenance_window": { "day": "saturday", "description": [ "Update TimescaleDB to version 1.2.1", "Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases" ], "hour": "08:45:12", "pending": true }, "name": "backend", "num_nodes": 1, "private_connection": { "database": "", "host": "private-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "private_network_uuid": "d455e75d-4858-4eec-8c95-da2f0a5f93a7", "region": "nyc3", "size": "db-s-2vcpu-4gb", "status": "online", "storage_size_mib": 61440, "tags": [ "production" ], "users": [ { "name": "doadmin", "password": "example_password", "role": "primary" } ], "version": "10", "version_end_of_availability": "2023-05-09T00:00:00Z", "version_end_of_life": "2023-11-09T00:00:00Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Database Cluster `/v2/databases` To create a database cluster, send a POST request to `/v2/databases`. To see a list of options for each engine, such as available regions, size slugs, and versions, send a GET request to the `/v2/databases/options` endpoint. The available sizes for the `storage_size_mib` field depends on the cluster's size. To see a list of available sizes, see [Managed Database Pricing](https://www.digitalocean.com/pricing/managed-databases?utm_source=docs-agent&utm_medium=md). The create response returns a JSON object with a key called `database`. The value of this is an object that contains the standard attributes associated with a database cluster. The initial value of the database cluster's `status` attribute is `creating`. When the cluster is ready to receive traffic, this changes to `online`. The embedded `connection` and `private_connection` objects contains the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects contain the information needed to connect to the cluster's standby node(s). DigitalOcean managed PostgreSQL and MySQL database clusters take automated daily backups. To create a new database cluster based on a backup of an existing cluster, send a POST request to `/v2/databases`. In addition to the standard database cluster attributes, the JSON body must include a key named `backup_restore` with the name of the original database cluster and the timestamp of the backup to be restored. Creating a database from a backup is the same as forking a database in the control panel. PostgreSQL and MySQL Advanced Edition clusters can be provisioned by setting `engine` to `advanced_pg` or `advanced_mysql`. Advanced Edition clusters are currently in public preview and target highly available workloads. `advanced_pg` supports 1-, 2-, and 3-node deployments; `advanced_mysql` only supports 1- and 3-node deployments. See the [PostgreSQL Advanced Edition](https://docs.digitalocean.com/products/databases/postgresql/how-to/use-advanced-edition-clusters/index.html.md) and [MySQL Advanced Edition](https://docs.digitalocean.com/products/databases/mysql/how-to/use-advanced-edition-clusters/index.html.md) documentation for the feature differences vs. Standard Edition and current preview limitations. Note: Caching cluster creates are no longer supported as of 2025-04-30T00:00:00Z. Backups are also not supported for Caching or Valkey clusters. #### Request Body: `application/json` `autoscale` object optional Autoscaling configuration for the database cluster. Currently only supports storage autoscaling. If null, autoscaling is not configured for the cluster. `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `db_names` array of string optional read-only Nullable Example: `["doadmin"]` An array of strings containing the names of databases created in the database cluster. `do_settings` object optional `engine` string (enum) required Example: `mysql` A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition engines are currently in public preview. `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database cluster. `maintenance_window` object optional `metrics_endpoints` array of object optional read-only Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s). **Show child properties** `host` string optional read-only Example: `db.example.com` A FQDN pointing to the database cluster's node(s). `port` integer optional read-only Example: `9273` The port on which a service is listening. `name` string required Example: `backend` A unique, human-readable name referring to a database cluster. `num_nodes` integer required Example: `2` The number of nodes in the database cluster. `private_connection` object optional `private_network_uuid` string optional Example: `d455e75d-4858-4eec-8c95-da2f0a5f93a7` A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `project_id` string (uuid) optional Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. Requires `project:assign_resource` scope. `region` string required Example: `nyc3` The slug identifier for the region where the database cluster is located. `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. `schema_registry_connection` object optional The connection details for Schema Registry. `semantic_version` string optional read-only Example: `8.0.28` A string representing the semantic version of the database engine in use for the cluster. `size` string required Example: `db-s-2vcpu-4gb` The slug identifier representing the size of the nodes in the database cluster. `standby_connection` object optional `standby_private_connection` object optional `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Nullable Example: `["production"]` An array of tags (as strings) to apply to the database cluster. Requires `tag:create` scope. `ui_connection` object optional The connection details for OpenSearch dashboard. `users` array of object optional read-only Nullable **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. `version` string optional Example: `8` A string representing the version of the database engine in use for the cluster. `version_end_of_availability` string optional read-only Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `version_end_of_life` string optional read-only Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. `backup_restore` object optional **Show child properties** `backup_created_at` string (date-time) optional Example: `2019-01-31T19:25:22Z` The timestamp of an existing database cluster backup in ISO8601 combined date and time format. The most recent backup will be used if excluded. `database_name` string required Example: `backend` The name of an existing database cluster from which the backup will be restored. ##### Request: `/v2/databases` ### Payload Content type `application/json` Example ```json { "engine": "pg", "name": "backend", "num_nodes": 2, "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "14" } ``` ```json { "do_settings": { "service_cnames": [ "db.example.com", "database.myapp.io" ] }, "engine": "pg", "name": "backend", "num_nodes": 2, "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "14" } ``` ```json { "engine": "pg", "name": "backend", "num_nodes": 2, "region": "nyc3", "rules": [ { "type": "ip_addr", "value": "192.168.1.1" }, { "type": "k8s", "value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61" }, { "type": "droplet", "value": "163973392" }, { "description": "a test tag", "type": "tag", "value": "test" } ], "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "14" } ``` ```json { "engine": "advanced_mysql", "name": "backend-advanced", "num_nodes": 3, "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "8.4.8" } ``` ```json { "engine": "advanced_pg", "name": "backend-advanced", "num_nodes": 3, "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "18" } ``` ```json { "engine": "advanced_mysql", "name": "backend-advanced-single", "num_nodes": 1, "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "tags": [ "production" ], "version": "8.4.8" } ``` ```json { "backup_restore": { "backup_created_at": "2019-01-31T19:25:22Z", "database_name": "backend" }, "engine": "pg", "name": "backend-restored", "num_nodes": 2, "region": "nyc3", "size": "db-s-2vcpu-4gb", "version": "14" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "backend", "engine": "pg", "version": "14", "region": "nyc3", "size": "db-s-2vcpu-4gb", "num_nodes": 2, "storage_size_mib": 61440, "tags": ["production"], "do_settings": {"service_cnames": ["db.example.com", "database.myapp.io"]}}' \ "https://api.digitalocean.com/v2/databases" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.DatabaseCreateRequest{ Name: "backend", EngineSlug: "pg", Version: "14", Region: "nyc3", SizeSlug: "db-s-2vcpu-4gb", NumNodes: 2, StorageSizeMiB : 61440, DOSettings: &godo.DOSettings{ ServiceCnames: []string{"db.example.com", "database.myapp.io"}, }, } cluster, _, err := client.Databases.Create(ctx, createRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_req = { "name": "backend", "engine": "pg", "version": "14", "region": "nyc3", "size": "db-s-2vcpu-4gb", "num_nodes": 2, "storage_size_mib": 61440, "tags": [ "production" ], "do_settings": { "service_cnames": [ "db.example.com", "database.myapp.io" ] } } create_resp = client.databases.create_cluster(body=create_req) ``` #### Responses **201** A JSON object with a key of database. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `database` object required **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `db_names` array of string optional read-only Nullable Example: `["doadmin"]` An array of strings containing the names of databases created in the database cluster. `do_settings` object optional `engine` string (enum) required Example: `mysql` A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition engines are currently in public preview. `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database cluster. `maintenance_window` object optional `metrics_endpoints` array of object optional read-only Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s). **Show child properties** `host` string optional read-only Example: `db.example.com` A FQDN pointing to the database cluster's node(s). `port` integer optional read-only Example: `9273` The port on which a service is listening. `name` string required Example: `backend` A unique, human-readable name referring to a database cluster. `num_nodes` integer required Example: `2` The number of nodes in the database cluster. `private_connection` object optional `private_network_uuid` string optional Example: `d455e75d-4858-4eec-8c95-da2f0a5f93a7` A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `project_id` string (uuid) optional Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. Requires `project:read` scope. `region` string required Example: `nyc3` The slug identifier for the region where the database cluster is located. `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. `schema_registry_connection` object optional The connection details for Schema Registry. `semantic_version` string optional read-only Example: `8.0.28` A string representing the semantic version of the database engine in use for the cluster. `size` string required Example: `db-s-2vcpu-4gb` The slug identifier representing the size of the nodes in the database cluster. `standby_connection` object optional `standby_private_connection` object optional `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Nullable Example: `["production"]` An array of tags that have been applied to the database cluster. Requires `tag:read` scope. `ui_connection` object optional The connection details for OpenSearch dashboard. `users` array of object optional read-only Nullable **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. `version` string optional Example: `8` A string representing the version of the database engine in use for the cluster. `version_end_of_availability` string optional read-only Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `version_end_of_life` string optional read-only Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "database": { "connection": { "database": "", "host": "db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "db_names": [ "defaultdb" ], "do_settings": { "service_cnames": [ "db.example.com", "database.myapp.io" ] }, "engine": "pg", "id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "maintenance_window": { "day": "saturday", "description": [ "Update TimescaleDB to version 1.2.1", "Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases" ], "hour": "08:45:12", "pending": true }, "name": "backend", "num_nodes": 2, "private_connection": { "database": "", "host": "private-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "private_network_uuid": "d455e75d-4858-4eec-8c95-da2f0a5f93a7", "region": "nyc3", "semantic_version": "14.5", "size": "db-s-2vcpu-4gb", "standby_connection": { "database": "", "host": "replica-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@replica-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "standby_private_connection": { "database": "", "host": "private-replica-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-replica-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "status": "creating", "storage_size_mib": 61440, "tags": [ "production" ], "users": [ { "name": "doadmin", "password": "example_password", "role": "primary" } ], "version": "14", "version_end_of_availability": "2023-05-09T00:00:00Z", "version_end_of_life": "2023-11-09T00:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Database Cluster `/v2/databases/{database_cluster_uuid}` To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID`. The response will be a JSON object with a database key. This will be set to an object containing the standard database cluster attributes. The embedded `connection` and `private_connection` objects will contain the information needed to access the database cluster. For multi-node clusters, the `standby_connection` and `standby_private_connection` objects contain the information needed to connect to the cluster's standby node(s). The embedded maintenance_window object will contain information about any scheduled maintenance for the database cluster. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() cluster, _, err := client.Databases.Get(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_cluster(database_cluster_uuid="a7a89a") ``` #### Responses **200** A JSON object with a key of database. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `database` object required **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `db_names` array of string optional read-only Nullable Example: `["doadmin"]` An array of strings containing the names of databases created in the database cluster. `do_settings` object optional `engine` string (enum) required Example: `mysql` A slug representing the database engine used for the cluster. The possible values are: "pg" for PostgreSQL, "mysql" for MySQL, "redis" for Caching, "mongodb" for MongoDB, "kafka" for Kafka, "opensearch" for OpenSearch, "valkey" for Valkey, "advanced_pg" for PostgreSQL Advanced Edition, and "advanced_mysql" for MySQL Advanced Edition. Advanced Edition engines are currently in public preview. `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database cluster. `maintenance_window` object optional `metrics_endpoints` array of object optional read-only Public hostname and port of the cluster's metrics endpoint(s). Includes one record for the cluster's primary node and a second entry for the cluster's standby node(s). **Show child properties** `host` string optional read-only Example: `db.example.com` A FQDN pointing to the database cluster's node(s). `port` integer optional read-only Example: `9273` The port on which a service is listening. `name` string required Example: `backend` A unique, human-readable name referring to a database cluster. `num_nodes` integer required Example: `2` The number of nodes in the database cluster. `private_connection` object optional `private_network_uuid` string optional Example: `d455e75d-4858-4eec-8c95-da2f0a5f93a7` A string specifying the UUID of the VPC to which the database cluster will be assigned. If excluded, the cluster when creating a new database cluster, it will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `project_id` string (uuid) optional Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` The ID of the project that the database cluster is assigned to. If excluded when creating a new database cluster, it will be assigned to your default project. Requires `project:read` scope. `region` string required Example: `nyc3` The slug identifier for the region where the database cluster is located. `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. `schema_registry_connection` object optional The connection details for Schema Registry. `semantic_version` string optional read-only Example: `8.0.28` A string representing the semantic version of the database engine in use for the cluster. `size` string required Example: `db-s-2vcpu-4gb` The slug identifier representing the size of the nodes in the database cluster. `standby_connection` object optional `standby_private_connection` object optional `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Nullable Example: `["production"]` An array of tags that have been applied to the database cluster. Requires `tag:read` scope. `ui_connection` object optional The connection details for OpenSearch dashboard. `users` array of object optional read-only Nullable **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. `version` string optional Example: `8` A string representing the version of the database engine in use for the cluster. `version_end_of_availability` string optional read-only Example: `2023-05-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be available for creating new clusters. If null, the version does not have an end of availability timeline. `version_end_of_life` string optional read-only Example: `2023-11-09T00:00:00Z` A timestamp referring to the date when the particular version will no longer be supported. If null, the version does not have an end of life timeline. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "database": { "connection": { "database": "", "host": "db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "db_names": [ "defaultdb" ], "do_settings": { "service_cnames": [ "db.example.com", "database.myapp.io" ] }, "engine": "pg", "id": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "maintenance_window": { "day": "saturday", "description": [ "Update TimescaleDB to version 1.2.1", "Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases" ], "hour": "08:45:12", "pending": true }, "name": "backend", "num_nodes": 2, "private_connection": { "database": "", "host": "private-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "private_network_uuid": "d455e75d-4858-4eec-8c95-da2f0a5f93a7", "region": "nyc3", "semantic_version": "14.5", "size": "db-s-2vcpu-4gb", "standby_connection": { "database": "", "host": "replica-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@replica-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "standby_private_connection": { "database": "", "host": "private-replica-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-replica-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "status": "creating", "storage_size_mib": 61440, "tags": [ "production" ], "users": [ { "name": "doadmin", "password": "example_password", "role": "primary" } ], "version": "14", "version_end_of_availability": "2023-05-09T00:00:00Z", "version_end_of_life": "2023-11-09T00:00:00Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Destroy a Database Cluster `/v2/databases/{database_cluster_uuid}` To destroy a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() _, err := client.Databases.Delete(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.destroy_cluster(database_cluster_uuid="a7abba8") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Database Cluster Configuration `/v2/databases/{database_cluster_uuid}/config` Shows configuration parameters for an existing database cluster by sending a GET request to `/v2/databases/$DATABASE_ID/config`. The response is a JSON object with a `config` key, which is set to an object containing any database configuration parameters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/config` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_config(database_cluster_uuid="a7a90ab") ``` #### Responses **200** A JSON object with a key of config. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `config` anyOf required One of: **Mysql Advanced Config** `automatic_sp_privileges` boolean optional Example: `true` When enabled, grants `EXECUTE` and `ALTER ROUTINE` privileges to the creator of a stored routine. When disabled, these privileges are not granted automatically. `backup_hour` integer optional Example: `3` The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. `backup_minute` integer optional Example: `30` The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed. `binlog_retention_period` number optional Example: `600` The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector. `connect_timeout` integer optional Example: `10` The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake. `default_time_zone` string optional Example: `+03:00` Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or 'SYSTEM' to use the MySQL server default. `div_precision_increment` integer optional Example: `4` The number of digits by which to increase the scale of the result of division operations performed with the `/` operator. `end_markers_in_json` boolean optional Example: `false` When enabled, the JSON output of `EXPLAIN FORMAT=JSON` includes end markers for nested structures. `eq_range_index_dive_limit` integer optional Example: `200` The number of equality ranges in an equality comparison condition when the optimizer should switch from using index dives to index statistics. `group_concat_max_len` integer optional Example: `1024` The maximum permitted result length, in bytes, for the GROUP_CONCAT() function. `information_schema_stats_expiry` integer optional Example: `86400` The time, in seconds, before cached statistics expire. `innodb_adaptive_hash_index` boolean optional Example: `true` When enabled, InnoDB uses an adaptive hash index to speed up equality lookups. The optimal setting is workload-dependent: it can improve performance for some workloads, but under high concurrency the associated latch can become a contention point, in which case disabling it may improve throughput. Default is true. `innodb_change_buffer_max_size` integer optional Example: `25` Specifies the maximum size of the InnoDB change buffer as a percentage of the buffer pool. `innodb_flush_neighbors` integer, one of: 0, 1, 2 optional Example: `0` Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent. - 0 — disables this functionality, dirty pages in the same extent are not flushed. - 1 — flushes contiguous dirty pages in the same extent. - 2 — flushes dirty pages in the same extent. `innodb_ft_enable_stopword` boolean optional Example: `true` When enabled, the InnoDB FULLTEXT index stopword list is used. Disabled by default when a custom stopword table is configured. `innodb_ft_max_token_size` integer optional Example: `20` The maximum length of words that an InnoDB FULLTEXT index stores. Changing this parameter will lead to a restart of the MySQL service. `innodb_ft_min_token_size` integer optional Example: `3` The minimum length of words that an InnoDB FULLTEXT index stores. `innodb_ft_num_word_optimize` integer optional Example: `2000` The number of words to process during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. `innodb_ft_result_cache_limit` integer optional Example: `2000000000` The InnoDB FULLTEXT index query result cache size limit, in bytes. `innodb_ft_server_stopword_table` string optional Example: `db_name/table_name` The InnoDB FULLTEXT index stopword list for all InnoDB tables. `innodb_ft_user_stopword_table` string optional Nullable Example: `db_name/table_name` The InnoDB FULLTEXT index stopword list for user-created FULLTEXT indexes. Must be in the form `db_name/table_name`. Set to `null` to clear a previously configured value. `innodb_lock_wait_timeout` integer optional Example: `50` The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up. `innodb_log_buffer_size` integer optional Example: `16777216` The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk. `innodb_online_alter_log_max_size` integer optional Example: `134217728` The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables. `innodb_optimize_fulltext_only` boolean optional Example: `false` When enabled, OPTIMIZE TABLE rebuilds only the InnoDB FULLTEXT index, not the table itself. `innodb_print_all_deadlocks` boolean optional Example: `true` When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default. `innodb_read_io_threads` integer optional Example: `16` The number of I/O threads for read operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. `innodb_rollback_on_timeout` boolean optional Example: `true` When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction. `innodb_thread_concurrency` integer optional Example: `0` Defines the maximum number of threads permitted inside of InnoDB. A value of 0 (the default) is interpreted as infinite concurrency (no limit). This variable is intended for performance tuning on high concurrency systems. `innodb_write_io_threads` integer optional Example: `16` The number of I/O threads for write operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. `interactive_timeout` integer optional Example: `3600` The time, in seconds, the server waits for activity on an interactive. connection before closing it. `internal_tmp_mem_storage_engine` string, one of: TempTable, MEMORY optional Example: `TempTable` The storage engine for in-memory internal temporary tables. `log_output` string, one of: INSIGHTS, TABLE, INSIGHTS,TABLE, NONE optional Example: `INSIGHTS` Defines the destination for logs. Can be `INSIGHTS`, `TABLE`, or both (`INSIGHTS,TABLE`), or `NONE` to disable logs. To specify both destinations, use `INSIGHTS,TABLE` (order matters). Default is NONE. `long_query_time` number optional Example: `10` The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds. `max_allowed_packet` integer optional Example: `67108864` The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M). `max_execution_time` integer optional Example: `0` The execution timeout for `SELECT` statements, in milliseconds. A value of `0` disables the timeout (no limit). `max_heap_table_size` integer optional Example: `16777216` The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) `max_seeks_for_key` integer optional Example: `1000` Limits the assumed maximum number of seeks when looking up rows based on a key. Lower values cause the query optimizer to prefer indexes over table scans for non-covering indexes. `mysql_incremental_backup` object optional MySQL Incremental Backup configuration settings **Show child properties** `enabled` boolean optional Enable periodic incremental backups. When enabled, full_backup_week_schedule must be set. Incremental backups only store changes since the last backup, making them faster and more storage-efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. `full_backup_week_schedule` string optional Example: `mon,thu` Comma-separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. Default is null. Example : "mon,fri,sun". `net_buffer_length` integer optional Example: `4096` Start sizes of connection buffer and result buffer, must be multiple of 1024. Changing this parameter will lead to a restart of the MySQL service. `net_read_timeout` integer optional Example: `30` The time, in seconds, to wait for more data from an existing connection. aborting the read. `net_write_timeout` integer optional Example: `30` The number of seconds to wait for a block to be written to a connection before aborting the write. `optimizer_prune_level` integer optional Example: `1` Controls the heuristics applied during query optimization to prune less promising partial plans from the optimizer search space. `0` disables pruning and `1` enables it. `optimizer_search_depth` integer optional Example: `62` The maximum depth of search performed by the query optimizer. Smaller values can reduce compilation time for large joins; a value of `0` lets the server automatically pick a reasonable value. `optimizer_switch` string optional Example: `batched_key_access=on,hash_join=off` Controls query optimizer behavior as a comma-separated list of `option=value` pairs, or `default` to restore server defaults. Each value must be `on`, `off`, or `default`. `slow_query_log` boolean optional Example: `true` When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false. `sort_buffer_size` integer optional Example: `262144` The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K). `sql_mode` string optional Example: `ANSI,TRADITIONAL` Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas. `sql_require_primary_key` boolean optional Example: `true` Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. `tmp_table_size` integer optional Example: `16777216` The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). `wait_timeout` integer optional Example: `28800` The number of seconds the server waits for activity on a noninteractive connection before closing it. `windowing_use_high_precision` boolean optional Example: `true` When enabled, window functions use a higher precision for internal calculations, which can be more accurate but slower. **Postgres Advanced Config** `autovacuum_analyze_scale_factor` number optional Example: `0.2` Specifies a fraction, in a decimal value, of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size). `autovacuum_analyze_threshold` integer optional Example: `50` Specifies the minimum number of inserted, updated, or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples. `autovacuum_freeze_max_age` integer optional Example: `200000000` Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted. `autovacuum_max_workers` integer optional Example: `5` Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start. `autovacuum_naptime` integer optional Example: `43200` Specifies the minimum delay, in seconds, between autovacuum runs on any given database. The default is one minute. `autovacuum_vacuum_cost_delay` integer optional Example: `20` Specifies the cost delay value, in milliseconds, that will be used in automatic VACUUM operations. If -1, uses the regular vacuum_cost_delay value, which is 20 milliseconds. `autovacuum_vacuum_cost_limit` integer optional Example: `-1` Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. `autovacuum_vacuum_scale_factor` number optional Example: `0.2` Specifies a fraction, in a decimal value, of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). `autovacuum_vacuum_threshold` integer optional Example: `50` Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. `backup_hour` integer optional Example: `3` The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. `backup_minute` integer optional Example: `30` The minute of the backup hour when backup for the service starts. New backup is only started if previous backup has already completed. `bgwriter_delay` integer optional Example: `200` Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms. `bgwriter_flush_after` integer optional Example: `512` The amount of kilobytes that need to be written by the background writer before attempting to force the OS to issue these writes to underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback. `bgwriter_lru_maxpages` integer optional Example: `100` The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100. `bgwriter_lru_multiplier` number optional Example: `2` The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. `deadlock_timeout` integer optional Example: `1000` The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. `default_toast_compression` string, one of: lz4, pglz optional Example: `lz4` Specifies the default TOAST compression method for values of compressible columns (the default is lz4). `idle_in_transaction_session_timeout` integer optional Example: `10000` Time out sessions with open transactions after this number of milliseconds `jit` boolean optional Example: `true` Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT). `log_autovacuum_min_duration` integer optional Example: `-1` Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions. `log_error_verbosity` string, one of: TERSE, DEFAULT, VERBOSE optional Example: `VERBOSE` Controls the amount of detail written in the server log for each message that is logged. `log_line_prefix` string, one of: pid=%p,user=%u,db=%d,app=%a,client=%h, %m \[%p] %q\[user=%u,db=%d,app=%a], %t \[%p]: \[%l-1] user=%u,db=%d,app=%a,client=%h optional Example: `pid=%p,user=%u,db=%d,app=%a,client=%h` Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. `log_min_duration_statement` integer optional Example: `-1` Log statements that take more than this number of milliseconds to run. If -1, disables. `max_connections` integer optional Example: `75` Sets the PostgreSQL maximum number of concurrent connections to the database server. This is a limited-release parameter. Contact your account team to confirm your eligibility. You cannot decrease this parameter value when set. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. `max_failover_replication_time_lag` integer optional Example: `50` Number of seconds of master unavailability before triggering database failover to standby. The default value is 60. `max_files_per_process` integer optional Example: `2048` PostgreSQL maximum number of files that can be open per process. `max_locks_per_transaction` integer optional Example: `128` PostgreSQL maximum locks per transaction. Once increased, this parameter cannot be lowered from its set value. `max_logical_replication_workers` integer optional Example: `16` PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers). `max_parallel_workers` integer optional Example: `12` Sets the maximum number of workers that the system can support for parallel queries. `max_parallel_workers_per_gather` integer optional Example: `16` Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. `max_pred_locks_per_transaction` integer optional Example: `128` PostgreSQL maximum predicate locks per transaction. `max_prepared_transactions` integer optional Example: `20` PostgreSQL maximum prepared transactions. Once increased, this parameter cannot be lowered from its set value. `max_replication_slots` integer optional Example: `16` PostgreSQL maximum replication slots. `max_slot_wal_keep_size` integer optional Example: `100` PostgreSQL maximum WAL size (MB) reserved for replication slots. If -1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. `max_stack_depth` integer optional Example: `2097152` Maximum depth of the stack in bytes. `max_standby_archive_delay` integer optional Example: `43200` Max standby archive delay in milliseconds. `max_standby_streaming_delay` integer optional Example: `43200` Max standby streaming delay in milliseconds. `max_wal_senders` integer optional Example: `32` PostgreSQL maximum WAL senders. Once increased, this parameter cannot be lowered from its set value. `max_worker_processes` integer optional Example: `16` Sets the maximum number of background processes that the system can support. Once increased, this parameter cannot be lowered from its set value. `pg_partman_bgw.interval` integer optional Example: `3600` Sets the time interval to run pg_partman's scheduled tasks. `pg_partman_bgw.role` string optional Example: `myrolename` Controls which role to use for pg_partman's scheduled background tasks. Must consist of alpha-numeric characters, dots, underscores, or dashes. May not start with dash or dot. Maximum of 64 characters. `pg_stat_statements.track` string, one of: all, top, none optional Example: `all` Controls which statements are counted. Specify 'top' to track top-level statements (those issued directly by clients), 'all' to also track nested statements (such as statements invoked within functions), or 'none' to disable statement statistics collection. The default value is top. `pgaudit` object optional System-wide settings for the pgaudit extension. When `feature_enabled` is true, the pgaudit extension is automatically installed. When false, the extension is uninstalled but auditing configurations (such as `log`) are preserved. **Show child properties** `feature_enabled` boolean optional Example: `false` Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed. Otherwise, extension will be uninstalled but auditing configurations will be preserved. `log` array of string (enum) optional Example: `["read","write","ddl"]` Specifies which classes of statements will be logged by session audit logging. Available values are `read` (SELECT and COPY when the source is a relation or query), `write` (INSERT, UPDATE, DELETE, TRUNCATE, and COPY when the destination is a relation), `function` (function calls and DO blocks), `role` (statements related to roles and privileges: GRANT, REVOKE, CREATE/ALTER/DROP ROLE), `ddl` (all DDL that is not included in the role class), `misc` (miscellaneous commands, e.g. DISCARD, FETCH, CHECKPOINT, VACUUM, SET), `misc_set` (miscellaneous SET commands, e.g. SET ROLE), and `all` (include all of the above). `pgbouncer` object optional PGBouncer connection pooling settings **Show child properties** `autodb_idle_timeout` integer optional Example: `3600` If the automatically-created database pools have been unused this many seconds, they are freed. If 0, timeout is disabled. `autodb_max_db_connections` integer optional Example: `1` Only allows a maximum this many server connections per database (regardless of user). If 0, allows unlimited connections. `autodb_pool_mode` string, one of: session, transaction, statement optional Example: `session` PGBouncer pool mode `autodb_pool_size` integer optional Example: `1` If non-zero, automatically creates a pool of that size per user when a pool doesn't exist. `ignore_startup_parameters` array of string, one of: extra_float_digits, search_path optional Example: `["extra_float_digits","search_path"]` List of parameters to ignore when given in startup packet. `min_pool_size` integer optional Example: `1` If current server connections are below this number, adds more. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. `server_idle_timeout` integer optional Example: `600` Drops server connections if they have been idle more than this many seconds. If 0, timeout is disabled. `server_lifetime` integer optional Example: `3600` The pooler closes any unused server connection that has been connected longer than this amount of seconds. `server_reset_query_always` boolean optional Example: `false` Run server_reset_query (DISCARD ALL) in all pooling modes. `shared_buffers_percentage` number optional Example: `41.5` Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. `stat_monitor_enable` boolean optional Example: `false` Enable the pg_stat_monitor extension. **Enabling this extension will cause the cluster to be restarted.** When this extension is enabled, pg_stat_statements results for utility commands are unreliable. `synchronous_replication` string, one of: off, quorum optional Example: `off` Synchronous replication type. Note that the service plan also needs to support synchronous replication. `temp_file_limit` integer optional Example: `5000000` PostgreSQL temporary file limit in KiB. If -1, sets to unlimited. `timescaledb` object optional TimescaleDB extension configuration values **Show child properties** `max_background_workers` integer optional Example: `8` The number of background workers for timescaledb operations. Set to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. `timezone` string optional Example: `Europe/Helsinki` PostgreSQL service timezone `track_activity_query_size` integer optional Example: `1024` Specifies the number of bytes reserved to track the currently executing command for each active session. `track_commit_timestamp` string, one of: off, on optional Example: `off` Record commit time of transactions. `track_functions` string, one of: all, pl, none optional Example: `all` Enables tracking of function call counts and time used. `track_io_timing` string, one of: off, on optional Example: `off` Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. `wal_sender_timeout` integer optional Example: `60000` Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. Must be either 0 or between 5000 and 10800000. `wal_writer_delay` integer optional Example: `50` WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance `work_mem` integer optional Example: `4` The maximum amount of memory, in MB, used by a query operation (such as a sort or hash table) before writing to temporary disk files. Default is 1MB + 0.075% of total RAM (up to 32MB). **Redis Advanced Config** `redis_acl_channels_default` string, one of: allchannels, resetchannels optional Example: `allchannels` Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Caching configuration acl-pubsub-default. `redis_io_threads` integer optional Example: `1` Caching IO thread count `redis_lfu_decay_time` integer optional Example: `1` LFU maxmemory-policy counter decay time in minutes `redis_lfu_log_factor` integer optional Example: `10` Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies `redis_maxmemory_policy` string (enum) optional Example: `allkeys-lru` A string specifying the desired eviction policy for the Caching cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys-lru:` Evict any key, least recently used (LRU) first. - `allkeys-random`: Evict keys in a random order. - `volatile-lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile-random`: Evict keys with expiration only in a random order. - `volatile-ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. `redis_notify_keyspace_events` string optional Example: `K` Set notify-keyspace-events option. Requires at least `K` or `E` and accepts any combination of the following options. Setting the parameter to `""` disables notifications. - `K` — Keyspace events - `E` — Keyevent events - `g` — Generic commands (e.g. `DEL`, `EXPIRE`, `RENAME`, ...) - `$` — String commands - `l` — List commands - `s` — Set commands - `h` — Hash commands - `z` — Sorted set commands - `t` — Stream commands - `d` — Module key type events - `x` — Expired events - `e` — Evicted events - `m` — Key miss events - `n` — New key events - `A` — Alias for `"g$lshztxed"` `redis_number_of_databases` integer optional Example: `16` Set number of redis databases. Changing this will cause a restart of redis service. `redis_persistence` string, one of: off, rdb optional Example: `rdb` Creates an RDB dump of the database every 10 minutes that can be used to recover data after a node crash. The database does not create the dump if no keys have changed since the last dump. When set to `off`, the database cannot fork services, and data can be lost if a service is restarted or powered off. DigitalOcean Managed Caching databases do not support the Append Only File (AOF) persistence method. `redis_pubsub_client_output_buffer_limit` integer optional Example: `64` Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. `redis_ssl` boolean optional Example: `true` Require SSL to access Caching. - When enabled, Caching accepts only SSL connections on port `25061`. - When disabled, port `25060` is opened for non-SSL connections, while port `25061` remains available for SSL connections. `redis_timeout` integer optional Example: `300` Caching idle connection timeout in seconds **Valkey Advanced Config** `frequent_snapshots` boolean optional Example: `true` Frequent RDB snapshots When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkey_persistence is set to off. `valkey_acl_channels_default` string, one of: allchannels, resetchannels optional Example: `allchannels` Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. `valkey_active_expire_effort` integer optional Example: `1` Active expire effort Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. `valkey_io_threads` integer optional Example: `1` Valkey IO thread count `valkey_lfu_decay_time` integer optional Example: `1` LFU maxmemory-policy counter decay time in minutes `valkey_lfu_log_factor` integer optional Example: `10` Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies `valkey_maxmemory_policy` string (enum) optional Example: `allkeys_lru` A string specifying the desired eviction policy for a Caching or Valkey cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys_lru:` Evict any key, least recently used (LRU) first. - `allkeys_random`: Evict keys in a random order. - `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile_random`: Evict keys with expiration only in a random order. - `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. `valkey_notify_keyspace_events` string optional Example: `K` Set notify-keyspace-events option. Requires at least `K` or `E` and accepts any combination of the following options. Setting the parameter to `""` disables notifications. - `K` — Keyspace events - `E` — Keyevent events - `g` — Generic commands (e.g. `DEL`, `EXPIRE`, `RENAME`, ...) - `$` — String commands - `l` — List commands - `s` — Set commands - `h` — Hash commands - `z` — Sorted set commands - `t` — Stream commands - `d` — Module key type events - `x` — Expired events - `e` — Evicted events - `m` — Key miss events - `n` — New key events - `A` — Alias for `"g$lshztxed"` `valkey_number_of_databases` integer optional Example: `16` Set number of valkey databases. Changing this will cause a restart of valkey service. `valkey_persistence` string, one of: off, rdb optional Example: `rdb` When persistence is 'rdb', Valkey does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to backup schedule for backup purposes. When persistence is 'off', no RDB dumps and backups are done, so data can be lost at any moment if service is restarted for any reason, or if service is powered off. Also service can't be forked. `valkey_pubsub_client_output_buffer_limit` integer optional Example: `64` Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. `valkey_ssl` boolean optional Example: `true` Require SSL to access Valkey `valkey_timeout` integer optional Example: `300` Valkey idle connection timeout in seconds **Kafka Advanced Config** `auto_create_topics_enable` boolean optional Example: `true` Enable auto creation of topics `compression_type` string (enum) optional Example: `gzip` Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. `connections_max_idle_ms` integer optional Example: `540000` Idle connections timeout: the server socket processor threads close the connections that idle for longer than this. `default_replication_factor` integer optional Example: `2` Replication factor for autocreated topics `group_initial_rebalance_delay_ms` integer optional Example: `3000` The amount of time, in milliseconds, the group coordinator will wait for more consumers to join a new group before performing the first rebalance. A longer delay means potentially fewer rebalances, but increases the time until processing begins. The default value for this is 3 seconds. During development and testing it might be desirable to set this to 0 in order to not delay test execution time. `group_max_session_timeout_ms` integer optional Example: `1800000` The maximum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. `group_min_session_timeout_ms` integer optional Example: `6000` The minimum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. `log_cleaner_delete_retention_ms` integer optional Example: `86400000` How long are delete records retained? `log_cleaner_max_compaction_lag_ms` integer optional Example: `60000` The maximum amount of time message will remain uncompacted. Only applicable for logs that are being compacted `log_cleaner_min_cleanable_ratio` number optional Example: `0.5` Controls log compactor frequency. Larger value means more frequent compactions but also more space wasted for logs. Consider setting log_cleaner_max_compaction_lag_ms to enforce compactions sooner, instead of setting a very high value for this option. `log_cleaner_min_compaction_lag_ms` integer optional Example: `100000` The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted. `log_cleanup_policy` string, one of: delete, compact, compact,delete optional Example: `delete` The default cleanup policy for segments beyond the retention window `log_flush_interval_messages` integer optional Example: `9223372036854776000` The number of messages accumulated on a log partition before messages are flushed to disk `log_flush_interval_ms` integer optional Example: `1000000` The maximum time in ms that a message in any topic is kept in memory before flushed to disk. If not set, the value in log.flush.scheduler.interval.ms is used `log_index_interval_bytes` integer optional Example: `4096` The interval with which Kafka adds an entry to the offset index `log_index_size_max_bytes` integer optional Example: `10485760` The maximum size in bytes of the offset index `log_message_downconversion_enable` boolean optional Example: `true` This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. `log_message_timestamp_difference_max_ms` integer optional Example: `1000000` The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message `log_message_timestamp_type` string, one of: CreateTime, LogAppendTime optional Example: `CreateTime` Define whether the timestamp in the message is message create time or log append time. `log_preallocate` boolean optional Example: `false` Controls whether to preallocate a file when creating a new segment `log_retention_bytes` integer optional Example: `1000000` The maximum size of the log before deleting messages `log_retention_hours` integer optional Example: `1000000` The number of hours to keep a log file before deleting it `log_retention_ms` integer optional Example: `100000000` The number of milliseconds to keep a log file before deleting it (in milliseconds), If not set, the value in log.retention.minutes is used. If set to -1, no time limit is applied. `log_roll_jitter_ms` integer optional Example: `10000000` The maximum jitter to subtract from logRollTimeMillis (in milliseconds). If not set, the value in log.roll.jitter.hours is used `log_roll_ms` integer optional Example: `1000000` The maximum time before a new log segment is rolled out (in milliseconds). `log_segment_bytes` integer optional Example: `100000000` The maximum size of a single log file `log_segment_delete_delay_ms` integer optional Example: `60000` The amount of time to wait before deleting a file from the filesystem `max_connections_per_ip` integer optional Example: `512` The maximum number of connections allowed from each ip address (defaults to 2147483647). `max_incremental_fetch_session_cache_slots` integer optional Example: `1000` The maximum number of incremental fetch sessions that the broker will maintain. `message_max_bytes` integer optional Example: `1048588` The maximum size of message that the server can receive. `min_insync_replicas` integer optional Example: `1` When a producer sets acks to 'all' (or '-1'), min_insync_replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. `num_partitions` integer optional Example: `10` Number of partitions for autocreated topics `offsets_retention_minutes` integer optional Example: `10080` Log retention window in minutes for offsets topic `producer_purgatory_purge_interval_requests` integer optional Example: `100` The purge interval (in number of requests) of the producer request purgatory (defaults to 1000). `replica_fetch_max_bytes` integer optional Example: `2097152` The number of bytes of messages to attempt to fetch for each partition (defaults to 1048576). This is not an absolute maximum, if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. `replica_fetch_response_max_bytes` integer optional Example: `20971520` Maximum bytes expected for the entire fetch response (defaults to 10485760). Records are fetched in batches, and if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. As such, this is not an absolute maximum. `schema_registry` boolean optional Example: `true` Enable creation of schema registry for the Kafka cluster. Schema_registry only works with General Purpose - Dedicated CPU plans. `socket_request_max_bytes` integer optional Example: `20971520` The maximum number of bytes in a socket request (defaults to 104857600). `transaction_remove_expired_transaction_cleanup_interval_ms` integer optional Example: `3600000` The interval at which to remove transactions that have expired due to transactional.id.expiration.ms passing (defaults to 3600000 (1 hour)). `transaction_state_log_segment_bytes` integer optional Example: `104857600` The transaction topic segment bytes should be kept relatively small in order to facilitate faster log compaction and cache loads (defaults to 104857600 (100 mebibytes)). **Opensearch Advanced Config** `action_auto_create_index_enabled` boolean optional Example: `true` Specifices whether to allow automatic creation of indices. `action_destructive_requires_name` boolean optional Example: `false` Specifies whether to require explicit index names when deleting indices. `cluster_max_shards_per_node` integer optional Example: `100` Maximum number of shards allowed per data node. `cluster_routing_allocation_node_concurrent_recoveries` integer optional Example: `2` Maximum concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen per node . `enable_security_audit` boolean optional Example: `false` Specifies whether to allow security audit logging. `http_max_content_length_bytes` integer optional Example: `100000000` Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. `http_max_header_size_bytes` integer optional Example: `8192` Maximum size of allowed headers, in bytes. `http_max_initial_line_length_bytes` integer optional Example: `4096` Maximum length of an HTTP URL, in bytes. `indices_fielddata_cache_size_percentage` integer optional Example: `3` Maximum amount of heap memory used for field data cache, expressed as a percentage. Decreasing the value too much will increase overhead of loading field data. Increasing the value too much will decrease amount of heap available for other operations. `indices_memory_index_buffer_size_percentage` integer optional Example: `10` Total amount of heap used for indexing buffer before writing segments to disk, expressed as a percentage. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. `indices_memory_max_index_buffer_size_mb` integer optional Example: `48` Maximum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. The default is unbounded. `indices_memory_min_index_buffer_size_mb` integer optional Example: `48` Minimum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. `indices_queries_cache_size_percentage` integer optional Example: `10` Maximum amount of heap used for query cache. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other functionality. `indices_query_bool_max_clause_count` integer optional Example: `1024` Maximum number of clauses Lucene BooleanQuery can have. Only increase it if necessary, as it may cause performance issues. `indices_recovery_max_concurrent_file_chunks` integer optional Example: `2` Maximum number of file chunks sent in parallel for each recovery. `indices_recovery_max_mb_per_sec` integer optional Example: `40` Limits total inbound and outbound recovery traffic for each node, expressed in mb per second. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). `ism_enabled` boolean optional Example: `true` Specifies whether ISM is enabled or not. `ism_history_enabled` boolean optional Example: `true` Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. `ism_history_max_age_hours` integer optional Example: `24` Maximum age before rolling over the audit history index, in hours. `ism_history_max_docs` integer optional Example: `2500000` Maximum number of documents before rolling over the audit history index. `ism_history_rollover_check_period_hours` integer optional Example: `8` The time between rollover checks for the audit history index, in hours. `ism_history_rollover_retention_period_days` integer optional Example: `30` Length of time long audit history indices are kept, in days. `keep_index_refresh_interval` boolean optional Example: `true` DigitalOcean automatically resets the `index.refresh_interval` to the default value (once per second) to ensure that new documents are quickly available for search queries. If you are setting your own refresh intervals, you can disable this by setting this field to true. `knn_memory_circuit_breaker_enabled` boolean optional Example: `true` Enable or disable KNN memory circuit breaker. `knn_memory_circuit_breaker_limit` integer optional Example: `60` Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. `override_main_response_version` boolean optional Example: `false` Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. `plugins_alerting_filter_by_backend_roles_enabled` boolean optional Example: `false` Enable or disable filtering of alerting by backend roles. `reindex_remote_whitelist` array of string optional Example: `["255.255.223.233:9200","222.33.222.222:6300"]` Allowlist of remote IP addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. `script_max_compilations_rate` string optional Example: `75/5m` Limits the number of inline script compilations within a period of time. Default is use-context `search_max_buckets` integer optional Example: `10000` Maximum number of aggregation buckets allowed in a single response. `thread_pool_analyze_queue_size` integer optional Example: `10` Size of queue for operations in the analyze thread pool. `thread_pool_analyze_size` integer optional Example: `1` Number of workers in the analyze operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_force_merge_size` integer optional Example: `1` Number of workers in the force merge operation thread pool. This pool is used for forcing a merge between shards of one or more indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_get_queue_size` integer optional Example: `10` Size of queue for operations in the get thread pool. `thread_pool_get_size` integer optional Example: `1` Number of workers in the get operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_search_queue_size` integer optional Example: `10` Size of queue for operations in the search thread pool. `thread_pool_search_size` integer optional Example: `1` Number of workers in the search operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_search_throttled_queue_size` integer optional Example: `10` Size of queue for operations in the search throttled thread pool. `thread_pool_search_throttled_size` integer optional Example: `1` Number of workers in the search throttled operation thread pool. This pool is used for searching frozen indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_write_queue_size` integer optional Example: `10` Size of queue for operations in the write thread pool. `thread_pool_write_size` integer optional Example: `1` Number of workers in the write operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. **Mongo Advanced Config** `default_read_concern` string, one of: local, available, majority optional Example: `local` Specifies the default consistency behavior of reads from the database. Data that is returned from the query with may or may not have been acknowledged by all nodes in the replicaset depending on this value. Learn more [here](https://www.mongodb.com/docs/manual/reference/read-concern/). `default_write_concern` string optional Example: `majority` Describes the level of acknowledgment requested from MongoDB for write operations clusters. This field can set to either `majority` or a number `0...n` which will describe the number of nodes that must acknowledge the write operation before it is fully accepted. Setting to `0` will request no acknowledgement of the write operation. Learn more [here](https://www.mongodb.com/docs/manual/reference/write-concern/). `slow_op_threshold_ms` integer optional Example: `200` Operations that run for longer than this threshold are considered slow which are then recorded to the diagnostic logs. Higher log levels (verbosity) will record all operations regardless of this threshold on the primary node. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-operationProfiling.slowOpThresholdMs). `transaction_lifetime_limit_seconds` integer optional Example: `100` Specifies the lifetime of multi-document transactions. Transactions that exceed this limit are considered expired and will be aborted by a periodic cleanup process. The cleanup process runs every `transactionLifetimeLimitSeconds/2 seconds` or at least once every 60 seconds. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.transactionLifetimeLimitSeconds). `verbosity` integer optional Example: `3` The log message verbosity level. The verbosity level determines the amount of Informational and Debug messages MongoDB outputs. 0 includes informational messages while 1...5 increases the level to include debug messages. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-systemLog.verbosity). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "config": { "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES", "sql_require_primary_key": true } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update the Database Configuration for an Existing Database `/v2/databases/{database_cluster_uuid}/config` To update the configuration for an existing database cluster, send a PATCH request to `/v2/databases/$DATABASE_ID/config`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `config` anyOf optional One of: **Mysql Advanced Config** `automatic_sp_privileges` boolean optional Example: `true` When enabled, grants `EXECUTE` and `ALTER ROUTINE` privileges to the creator of a stored routine. When disabled, these privileges are not granted automatically. `backup_hour` integer optional Example: `3` The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. `backup_minute` integer optional Example: `30` The minute of the backup hour when backup for the service starts. New backup only starts if previous backup has already completed. `binlog_retention_period` number optional Example: `600` The minimum amount of time, in seconds, to keep binlog entries before deletion. This may be extended for services that require binlog entries for longer than the default, for example if using the MySQL Debezium Kafka connector. `connect_timeout` integer optional Example: `10` The number of seconds that the mysqld server waits for a connect packet before responding with bad handshake. `default_time_zone` string optional Example: `+03:00` Default server time zone, in the form of an offset from UTC (from -12:00 to +12:00), a time zone name (EST), or 'SYSTEM' to use the MySQL server default. `div_precision_increment` integer optional Example: `4` The number of digits by which to increase the scale of the result of division operations performed with the `/` operator. `end_markers_in_json` boolean optional Example: `false` When enabled, the JSON output of `EXPLAIN FORMAT=JSON` includes end markers for nested structures. `eq_range_index_dive_limit` integer optional Example: `200` The number of equality ranges in an equality comparison condition when the optimizer should switch from using index dives to index statistics. `group_concat_max_len` integer optional Example: `1024` The maximum permitted result length, in bytes, for the GROUP_CONCAT() function. `information_schema_stats_expiry` integer optional Example: `86400` The time, in seconds, before cached statistics expire. `innodb_adaptive_hash_index` boolean optional Example: `true` When enabled, InnoDB uses an adaptive hash index to speed up equality lookups. The optimal setting is workload-dependent: it can improve performance for some workloads, but under high concurrency the associated latch can become a contention point, in which case disabling it may improve throughput. Default is true. `innodb_change_buffer_max_size` integer optional Example: `25` Specifies the maximum size of the InnoDB change buffer as a percentage of the buffer pool. `innodb_flush_neighbors` integer, one of: 0, 1, 2 optional Example: `0` Specifies whether flushing a page from the InnoDB buffer pool also flushes other dirty pages in the same extent. - 0 — disables this functionality, dirty pages in the same extent are not flushed. - 1 — flushes contiguous dirty pages in the same extent. - 2 — flushes dirty pages in the same extent. `innodb_ft_enable_stopword` boolean optional Example: `true` When enabled, the InnoDB FULLTEXT index stopword list is used. Disabled by default when a custom stopword table is configured. `innodb_ft_max_token_size` integer optional Example: `20` The maximum length of words that an InnoDB FULLTEXT index stores. Changing this parameter will lead to a restart of the MySQL service. `innodb_ft_min_token_size` integer optional Example: `3` The minimum length of words that an InnoDB FULLTEXT index stores. `innodb_ft_num_word_optimize` integer optional Example: `2000` The number of words to process during each OPTIMIZE TABLE operation on an InnoDB FULLTEXT index. `innodb_ft_result_cache_limit` integer optional Example: `2000000000` The InnoDB FULLTEXT index query result cache size limit, in bytes. `innodb_ft_server_stopword_table` string optional Example: `db_name/table_name` The InnoDB FULLTEXT index stopword list for all InnoDB tables. `innodb_ft_user_stopword_table` string optional Nullable Example: `db_name/table_name` The InnoDB FULLTEXT index stopword list for user-created FULLTEXT indexes. Must be in the form `db_name/table_name`. Set to `null` to clear a previously configured value. `innodb_lock_wait_timeout` integer optional Example: `50` The time, in seconds, that an InnoDB transaction waits for a row lock. before giving up. `innodb_log_buffer_size` integer optional Example: `16777216` The size of the buffer, in bytes, that InnoDB uses to write to the log files. on disk. `innodb_online_alter_log_max_size` integer optional Example: `134217728` The upper limit, in bytes, of the size of the temporary log files used during online DDL operations for InnoDB tables. `innodb_optimize_fulltext_only` boolean optional Example: `false` When enabled, OPTIMIZE TABLE rebuilds only the InnoDB FULLTEXT index, not the table itself. `innodb_print_all_deadlocks` boolean optional Example: `true` When enabled, records information about all deadlocks in InnoDB user transactions in the error log. Disabled by default. `innodb_read_io_threads` integer optional Example: `16` The number of I/O threads for read operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. `innodb_rollback_on_timeout` boolean optional Example: `true` When enabled, transaction timeouts cause InnoDB to abort and roll back the entire transaction. `innodb_thread_concurrency` integer optional Example: `0` Defines the maximum number of threads permitted inside of InnoDB. A value of 0 (the default) is interpreted as infinite concurrency (no limit). This variable is intended for performance tuning on high concurrency systems. `innodb_write_io_threads` integer optional Example: `16` The number of I/O threads for write operations in InnoDB. Changing this parameter will lead to a restart of the MySQL service. `interactive_timeout` integer optional Example: `3600` The time, in seconds, the server waits for activity on an interactive. connection before closing it. `internal_tmp_mem_storage_engine` string, one of: TempTable, MEMORY optional Example: `TempTable` The storage engine for in-memory internal temporary tables. `log_output` string, one of: INSIGHTS, TABLE, INSIGHTS,TABLE, NONE optional Example: `INSIGHTS` Defines the destination for logs. Can be `INSIGHTS`, `TABLE`, or both (`INSIGHTS,TABLE`), or `NONE` to disable logs. To specify both destinations, use `INSIGHTS,TABLE` (order matters). Default is NONE. `long_query_time` number optional Example: `10` The time, in seconds, for a query to take to execute before being captured by slow_query_logs. Default is 10 seconds. `max_allowed_packet` integer optional Example: `67108864` The size of the largest message, in bytes, that can be received by the server. Default is 67108864 (64M). `max_execution_time` integer optional Example: `0` The execution timeout for `SELECT` statements, in milliseconds. A value of `0` disables the timeout (no limit). `max_heap_table_size` integer optional Example: `16777216` The maximum size, in bytes, of internal in-memory tables. Also set tmp_table_size. Default is 16777216 (16M) `max_seeks_for_key` integer optional Example: `1000` Limits the assumed maximum number of seeks when looking up rows based on a key. Lower values cause the query optimizer to prefer indexes over table scans for non-covering indexes. `mysql_incremental_backup` object optional MySQL Incremental Backup configuration settings **Show child properties** `enabled` boolean optional Enable periodic incremental backups. When enabled, full_backup_week_schedule must be set. Incremental backups only store changes since the last backup, making them faster and more storage-efficient than full backups. This is particularly useful for large databases where daily full backups would be too time-consuming or expensive. `full_backup_week_schedule` string optional Example: `mon,thu` Comma-separated list of days of the week when full backups should be created. Valid values: mon, tue, wed, thu, fri, sat, sun. Default is null. Example : "mon,fri,sun". `net_buffer_length` integer optional Example: `4096` Start sizes of connection buffer and result buffer, must be multiple of 1024. Changing this parameter will lead to a restart of the MySQL service. `net_read_timeout` integer optional Example: `30` The time, in seconds, to wait for more data from an existing connection. aborting the read. `net_write_timeout` integer optional Example: `30` The number of seconds to wait for a block to be written to a connection before aborting the write. `optimizer_prune_level` integer optional Example: `1` Controls the heuristics applied during query optimization to prune less promising partial plans from the optimizer search space. `0` disables pruning and `1` enables it. `optimizer_search_depth` integer optional Example: `62` The maximum depth of search performed by the query optimizer. Smaller values can reduce compilation time for large joins; a value of `0` lets the server automatically pick a reasonable value. `optimizer_switch` string optional Example: `batched_key_access=on,hash_join=off` Controls query optimizer behavior as a comma-separated list of `option=value` pairs, or `default` to restore server defaults. Each value must be `on`, `off`, or `default`. `slow_query_log` boolean optional Example: `true` When enabled, captures slow queries. When disabled, also truncates the mysql.slow_log table. Default is false. `sort_buffer_size` integer optional Example: `262144` The sort buffer size, in bytes, for ORDER BY optimization. Default is 262144. (256K). `sql_mode` string optional Example: `ANSI,TRADITIONAL` Global SQL mode. If empty, uses MySQL server defaults. Must only include uppercase alphabetic characters, underscores, and commas. `sql_require_primary_key` boolean optional Example: `true` Require primary key to be defined for new tables or old tables modified with ALTER TABLE and fail if missing. It is recommended to always have primary keys because various functionality may break if any large table is missing them. `tmp_table_size` integer optional Example: `16777216` The maximum size, in bytes, of internal in-memory tables. Also set max_heap_table_size. Default is 16777216 (16M). `wait_timeout` integer optional Example: `28800` The number of seconds the server waits for activity on a noninteractive connection before closing it. `windowing_use_high_precision` boolean optional Example: `true` When enabled, window functions use a higher precision for internal calculations, which can be more accurate but slower. **Postgres Advanced Config** `autovacuum_analyze_scale_factor` number optional Example: `0.2` Specifies a fraction, in a decimal value, of the table size to add to autovacuum_analyze_threshold when deciding whether to trigger an ANALYZE. The default is 0.2 (20% of table size). `autovacuum_analyze_threshold` integer optional Example: `50` Specifies the minimum number of inserted, updated, or deleted tuples needed to trigger an ANALYZE in any one table. The default is 50 tuples. `autovacuum_freeze_max_age` integer optional Example: `200000000` Specifies the maximum age (in transactions) that a table's pg_class.relfrozenxid field can attain before a VACUUM operation is forced to prevent transaction ID wraparound within the table. Note that the system will launch autovacuum processes to prevent wraparound even when autovacuum is otherwise disabled. This parameter will cause the server to be restarted. `autovacuum_max_workers` integer optional Example: `5` Specifies the maximum number of autovacuum processes (other than the autovacuum launcher) that may be running at any one time. The default is three. This parameter can only be set at server start. `autovacuum_naptime` integer optional Example: `43200` Specifies the minimum delay, in seconds, between autovacuum runs on any given database. The default is one minute. `autovacuum_vacuum_cost_delay` integer optional Example: `20` Specifies the cost delay value, in milliseconds, that will be used in automatic VACUUM operations. If -1, uses the regular vacuum_cost_delay value, which is 20 milliseconds. `autovacuum_vacuum_cost_limit` integer optional Example: `-1` Specifies the cost limit value that will be used in automatic VACUUM operations. If -1 is specified (which is the default), the regular vacuum_cost_limit value will be used. `autovacuum_vacuum_scale_factor` number optional Example: `0.2` Specifies a fraction, in a decimal value, of the table size to add to autovacuum_vacuum_threshold when deciding whether to trigger a VACUUM. The default is 0.2 (20% of table size). `autovacuum_vacuum_threshold` integer optional Example: `50` Specifies the minimum number of updated or deleted tuples needed to trigger a VACUUM in any one table. The default is 50 tuples. `backup_hour` integer optional Example: `3` The hour of day (in UTC) when backup for the service starts. New backup only starts if previous backup has already completed. `backup_minute` integer optional Example: `30` The minute of the backup hour when backup for the service starts. New backup is only started if previous backup has already completed. `bgwriter_delay` integer optional Example: `200` Specifies the delay, in milliseconds, between activity rounds for the background writer. Default is 200 ms. `bgwriter_flush_after` integer optional Example: `512` The amount of kilobytes that need to be written by the background writer before attempting to force the OS to issue these writes to underlying storage. Specified in kilobytes, default is 512. Setting of 0 disables forced writeback. `bgwriter_lru_maxpages` integer optional Example: `100` The maximum number of buffers that the background writer can write. Setting this to zero disables background writing. Default is 100. `bgwriter_lru_multiplier` number optional Example: `2` The average recent need for new buffers is multiplied by bgwriter_lru_multiplier to arrive at an estimate of the number that will be needed during the next round, (up to bgwriter_lru_maxpages). 1.0 represents a “just in time” policy of writing exactly the number of buffers predicted to be needed. Larger values provide some cushion against spikes in demand, while smaller values intentionally leave writes to be done by server processes. The default is 2.0. `deadlock_timeout` integer optional Example: `1000` The amount of time, in milliseconds, to wait on a lock before checking to see if there is a deadlock condition. `default_toast_compression` string, one of: lz4, pglz optional Example: `lz4` Specifies the default TOAST compression method for values of compressible columns (the default is lz4). `idle_in_transaction_session_timeout` integer optional Example: `10000` Time out sessions with open transactions after this number of milliseconds `jit` boolean optional Example: `true` Activates, in a boolean, the system-wide use of Just-in-Time Compilation (JIT). `log_autovacuum_min_duration` integer optional Example: `-1` Causes each action executed by autovacuum to be logged if it ran for at least the specified number of milliseconds. Setting this to zero logs all autovacuum actions. Minus-one (the default) disables logging autovacuum actions. `log_error_verbosity` string, one of: TERSE, DEFAULT, VERBOSE optional Example: `VERBOSE` Controls the amount of detail written in the server log for each message that is logged. `log_line_prefix` string, one of: pid=%p,user=%u,db=%d,app=%a,client=%h, %m \[%p] %q\[user=%u,db=%d,app=%a], %t \[%p]: \[%l-1] user=%u,db=%d,app=%a,client=%h optional Example: `pid=%p,user=%u,db=%d,app=%a,client=%h` Selects one of the available log-formats. These can support popular log analyzers like pgbadger, pganalyze, etc. `log_min_duration_statement` integer optional Example: `-1` Log statements that take more than this number of milliseconds to run. If -1, disables. `max_connections` integer optional Example: `75` Sets the PostgreSQL maximum number of concurrent connections to the database server. This is a limited-release parameter. Contact your account team to confirm your eligibility. You cannot decrease this parameter value when set. For services with a read replica, first increase the read replica's value. After the change is applied to the replica, you can increase the primary service's value. Changing this parameter causes a service restart. `max_failover_replication_time_lag` integer optional Example: `50` Number of seconds of master unavailability before triggering database failover to standby. The default value is 60. `max_files_per_process` integer optional Example: `2048` PostgreSQL maximum number of files that can be open per process. `max_locks_per_transaction` integer optional Example: `128` PostgreSQL maximum locks per transaction. Once increased, this parameter cannot be lowered from its set value. `max_logical_replication_workers` integer optional Example: `16` PostgreSQL maximum logical replication workers (taken from the pool of max_parallel_workers). `max_parallel_workers` integer optional Example: `12` Sets the maximum number of workers that the system can support for parallel queries. `max_parallel_workers_per_gather` integer optional Example: `16` Sets the maximum number of workers that can be started by a single Gather or Gather Merge node. `max_pred_locks_per_transaction` integer optional Example: `128` PostgreSQL maximum predicate locks per transaction. `max_prepared_transactions` integer optional Example: `20` PostgreSQL maximum prepared transactions. Once increased, this parameter cannot be lowered from its set value. `max_replication_slots` integer optional Example: `16` PostgreSQL maximum replication slots. `max_slot_wal_keep_size` integer optional Example: `100` PostgreSQL maximum WAL size (MB) reserved for replication slots. If -1 is specified, replication slots may retain an unlimited amount of WAL files. The default is -1 (upstream default). wal_keep_size minimum WAL size setting takes precedence over this. `max_stack_depth` integer optional Example: `2097152` Maximum depth of the stack in bytes. `max_standby_archive_delay` integer optional Example: `43200` Max standby archive delay in milliseconds. `max_standby_streaming_delay` integer optional Example: `43200` Max standby streaming delay in milliseconds. `max_wal_senders` integer optional Example: `32` PostgreSQL maximum WAL senders. Once increased, this parameter cannot be lowered from its set value. `max_worker_processes` integer optional Example: `16` Sets the maximum number of background processes that the system can support. Once increased, this parameter cannot be lowered from its set value. `pg_partman_bgw.interval` integer optional Example: `3600` Sets the time interval to run pg_partman's scheduled tasks. `pg_partman_bgw.role` string optional Example: `myrolename` Controls which role to use for pg_partman's scheduled background tasks. Must consist of alpha-numeric characters, dots, underscores, or dashes. May not start with dash or dot. Maximum of 64 characters. `pg_stat_statements.track` string, one of: all, top, none optional Example: `all` Controls which statements are counted. Specify 'top' to track top-level statements (those issued directly by clients), 'all' to also track nested statements (such as statements invoked within functions), or 'none' to disable statement statistics collection. The default value is top. `pgaudit` object optional System-wide settings for the pgaudit extension. When `feature_enabled` is true, the pgaudit extension is automatically installed. When false, the extension is uninstalled but auditing configurations (such as `log`) are preserved. **Show child properties** `feature_enabled` boolean optional Example: `false` Enable pgaudit extension. When enabled, pgaudit extension will be automatically installed. Otherwise, extension will be uninstalled but auditing configurations will be preserved. `log` array of string (enum) optional Example: `["read","write","ddl"]` Specifies which classes of statements will be logged by session audit logging. Available values are `read` (SELECT and COPY when the source is a relation or query), `write` (INSERT, UPDATE, DELETE, TRUNCATE, and COPY when the destination is a relation), `function` (function calls and DO blocks), `role` (statements related to roles and privileges: GRANT, REVOKE, CREATE/ALTER/DROP ROLE), `ddl` (all DDL that is not included in the role class), `misc` (miscellaneous commands, e.g. DISCARD, FETCH, CHECKPOINT, VACUUM, SET), `misc_set` (miscellaneous SET commands, e.g. SET ROLE), and `all` (include all of the above). `pgbouncer` object optional PGBouncer connection pooling settings **Show child properties** `autodb_idle_timeout` integer optional Example: `3600` If the automatically-created database pools have been unused this many seconds, they are freed. If 0, timeout is disabled. `autodb_max_db_connections` integer optional Example: `1` Only allows a maximum this many server connections per database (regardless of user). If 0, allows unlimited connections. `autodb_pool_mode` string, one of: session, transaction, statement optional Example: `session` PGBouncer pool mode `autodb_pool_size` integer optional Example: `1` If non-zero, automatically creates a pool of that size per user when a pool doesn't exist. `ignore_startup_parameters` array of string, one of: extra_float_digits, search_path optional Example: `["extra_float_digits","search_path"]` List of parameters to ignore when given in startup packet. `min_pool_size` integer optional Example: `1` If current server connections are below this number, adds more. Improves behavior when usual load comes suddenly back after period of total inactivity. The value is effectively capped at the pool size. `server_idle_timeout` integer optional Example: `600` Drops server connections if they have been idle more than this many seconds. If 0, timeout is disabled. `server_lifetime` integer optional Example: `3600` The pooler closes any unused server connection that has been connected longer than this amount of seconds. `server_reset_query_always` boolean optional Example: `false` Run server_reset_query (DISCARD ALL) in all pooling modes. `shared_buffers_percentage` number optional Example: `41.5` Percentage of total RAM that the database server uses for shared memory buffers. Valid range is 20-60 (float), which corresponds to 20% - 60%. This setting adjusts the shared_buffers configuration value. `stat_monitor_enable` boolean optional Example: `false` Enable the pg_stat_monitor extension. **Enabling this extension will cause the cluster to be restarted.** When this extension is enabled, pg_stat_statements results for utility commands are unreliable. `synchronous_replication` string, one of: off, quorum optional Example: `off` Synchronous replication type. Note that the service plan also needs to support synchronous replication. `temp_file_limit` integer optional Example: `5000000` PostgreSQL temporary file limit in KiB. If -1, sets to unlimited. `timescaledb` object optional TimescaleDB extension configuration values **Show child properties** `max_background_workers` integer optional Example: `8` The number of background workers for timescaledb operations. Set to the sum of your number of databases and the total number of concurrent background workers you want running at any given point in time. `timezone` string optional Example: `Europe/Helsinki` PostgreSQL service timezone `track_activity_query_size` integer optional Example: `1024` Specifies the number of bytes reserved to track the currently executing command for each active session. `track_commit_timestamp` string, one of: off, on optional Example: `off` Record commit time of transactions. `track_functions` string, one of: all, pl, none optional Example: `all` Enables tracking of function call counts and time used. `track_io_timing` string, one of: off, on optional Example: `off` Enables timing of database I/O calls. This parameter is off by default, because it will repeatedly query the operating system for the current time, which may cause significant overhead on some platforms. `wal_sender_timeout` integer optional Example: `60000` Terminate replication connections that are inactive for longer than this amount of time, in milliseconds. Setting this value to zero disables the timeout. Must be either 0 or between 5000 and 10800000. `wal_writer_delay` integer optional Example: `50` WAL flush interval in milliseconds. Note that setting this value to lower than the default 200ms may negatively impact performance `work_mem` integer optional Example: `4` The maximum amount of memory, in MB, used by a query operation (such as a sort or hash table) before writing to temporary disk files. Default is 1MB + 0.075% of total RAM (up to 32MB). **Redis Advanced Config** `redis_acl_channels_default` string, one of: allchannels, resetchannels optional Example: `allchannels` Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Caching configuration acl-pubsub-default. `redis_io_threads` integer optional Example: `1` Caching IO thread count `redis_lfu_decay_time` integer optional Example: `1` LFU maxmemory-policy counter decay time in minutes `redis_lfu_log_factor` integer optional Example: `10` Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies `redis_maxmemory_policy` string (enum) optional Example: `allkeys-lru` A string specifying the desired eviction policy for the Caching cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys-lru:` Evict any key, least recently used (LRU) first. - `allkeys-random`: Evict keys in a random order. - `volatile-lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile-random`: Evict keys with expiration only in a random order. - `volatile-ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. `redis_notify_keyspace_events` string optional Example: `K` Set notify-keyspace-events option. Requires at least `K` or `E` and accepts any combination of the following options. Setting the parameter to `""` disables notifications. - `K` — Keyspace events - `E` — Keyevent events - `g` — Generic commands (e.g. `DEL`, `EXPIRE`, `RENAME`, ...) - `$` — String commands - `l` — List commands - `s` — Set commands - `h` — Hash commands - `z` — Sorted set commands - `t` — Stream commands - `d` — Module key type events - `x` — Expired events - `e` — Evicted events - `m` — Key miss events - `n` — New key events - `A` — Alias for `"g$lshztxed"` `redis_number_of_databases` integer optional Example: `16` Set number of redis databases. Changing this will cause a restart of redis service. `redis_persistence` string, one of: off, rdb optional Example: `rdb` Creates an RDB dump of the database every 10 minutes that can be used to recover data after a node crash. The database does not create the dump if no keys have changed since the last dump. When set to `off`, the database cannot fork services, and data can be lost if a service is restarted or powered off. DigitalOcean Managed Caching databases do not support the Append Only File (AOF) persistence method. `redis_pubsub_client_output_buffer_limit` integer optional Example: `64` Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. `redis_ssl` boolean optional Example: `true` Require SSL to access Caching. - When enabled, Caching accepts only SSL connections on port `25061`. - When disabled, port `25060` is opened for non-SSL connections, while port `25061` remains available for SSL connections. `redis_timeout` integer optional Example: `300` Caching idle connection timeout in seconds **Valkey Advanced Config** `frequent_snapshots` boolean optional Example: `true` Frequent RDB snapshots When enabled, Valkey will create frequent local RDB snapshots. When disabled, Valkey will only take RDB snapshots when a backup is created, based on the backup schedule. This setting is ignored when valkey_persistence is set to off. `valkey_acl_channels_default` string, one of: allchannels, resetchannels optional Example: `allchannels` Determines default pub/sub channels' ACL for new users if ACL is not supplied. When this option is not defined, all_channels is assumed to keep backward compatibility. This option doesn't affect Valkey configuration acl-pubsub-default. `valkey_active_expire_effort` integer optional Example: `1` Active expire effort Valkey reclaims expired keys both when accessed and in the background. The background process scans for expired keys to free memory. Increasing the active-expire-effort setting (default 1, max 10) uses more CPU to reclaim expired keys faster, reducing memory usage but potentially increasing latency. `valkey_io_threads` integer optional Example: `1` Valkey IO thread count `valkey_lfu_decay_time` integer optional Example: `1` LFU maxmemory-policy counter decay time in minutes `valkey_lfu_log_factor` integer optional Example: `10` Counter logarithm factor for volatile-lfu and allkeys-lfu maxmemory-policies `valkey_maxmemory_policy` string (enum) optional Example: `allkeys_lru` A string specifying the desired eviction policy for a Caching or Valkey cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys_lru:` Evict any key, least recently used (LRU) first. - `allkeys_random`: Evict keys in a random order. - `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile_random`: Evict keys with expiration only in a random order. - `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. `valkey_notify_keyspace_events` string optional Example: `K` Set notify-keyspace-events option. Requires at least `K` or `E` and accepts any combination of the following options. Setting the parameter to `""` disables notifications. - `K` — Keyspace events - `E` — Keyevent events - `g` — Generic commands (e.g. `DEL`, `EXPIRE`, `RENAME`, ...) - `$` — String commands - `l` — List commands - `s` — Set commands - `h` — Hash commands - `z` — Sorted set commands - `t` — Stream commands - `d` — Module key type events - `x` — Expired events - `e` — Evicted events - `m` — Key miss events - `n` — New key events - `A` — Alias for `"g$lshztxed"` `valkey_number_of_databases` integer optional Example: `16` Set number of valkey databases. Changing this will cause a restart of valkey service. `valkey_persistence` string, one of: off, rdb optional Example: `rdb` When persistence is 'rdb', Valkey does RDB dumps each 10 minutes if any key is changed. Also RDB dumps are done according to backup schedule for backup purposes. When persistence is 'off', no RDB dumps and backups are done, so data can be lost at any moment if service is restarted for any reason, or if service is powered off. Also service can't be forked. `valkey_pubsub_client_output_buffer_limit` integer optional Example: `64` Set output buffer limit for pub / sub clients in MB. The value is the hard limit, the soft limit is 1/4 of the hard limit. When setting the limit, be mindful of the available memory in the selected service plan. `valkey_ssl` boolean optional Example: `true` Require SSL to access Valkey `valkey_timeout` integer optional Example: `300` Valkey idle connection timeout in seconds **Mongo Advanced Config** `default_read_concern` string, one of: local, available, majority optional Example: `local` Specifies the default consistency behavior of reads from the database. Data that is returned from the query with may or may not have been acknowledged by all nodes in the replicaset depending on this value. Learn more [here](https://www.mongodb.com/docs/manual/reference/read-concern/). `default_write_concern` string optional Example: `majority` Describes the level of acknowledgment requested from MongoDB for write operations clusters. This field can set to either `majority` or a number `0...n` which will describe the number of nodes that must acknowledge the write operation before it is fully accepted. Setting to `0` will request no acknowledgement of the write operation. Learn more [here](https://www.mongodb.com/docs/manual/reference/write-concern/). `slow_op_threshold_ms` integer optional Example: `200` Operations that run for longer than this threshold are considered slow which are then recorded to the diagnostic logs. Higher log levels (verbosity) will record all operations regardless of this threshold on the primary node. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-operationProfiling.slowOpThresholdMs). `transaction_lifetime_limit_seconds` integer optional Example: `100` Specifies the lifetime of multi-document transactions. Transactions that exceed this limit are considered expired and will be aborted by a periodic cleanup process. The cleanup process runs every `transactionLifetimeLimitSeconds/2 seconds` or at least once every 60 seconds. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/parameters/#mongodb-parameter-param.transactionLifetimeLimitSeconds). `verbosity` integer optional Example: `3` The log message verbosity level. The verbosity level determines the amount of Informational and Debug messages MongoDB outputs. 0 includes informational messages while 1...5 increases the level to include debug messages. *Changing this parameter will lead to a restart of the MongoDB service.* Learn more [here](https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-systemLog.verbosity). **Kafka Advanced Config** `auto_create_topics_enable` boolean optional Example: `true` Enable auto creation of topics `compression_type` string (enum) optional Example: `gzip` Specify the final compression type for a given topic. This configuration accepts the standard compression codecs ('gzip', 'snappy', 'lz4', 'zstd'). It additionally accepts 'uncompressed' which is equivalent to no compression; and 'producer' which means retain the original compression codec set by the producer. `connections_max_idle_ms` integer optional Example: `540000` Idle connections timeout: the server socket processor threads close the connections that idle for longer than this. `default_replication_factor` integer optional Example: `2` Replication factor for autocreated topics `group_initial_rebalance_delay_ms` integer optional Example: `3000` The amount of time, in milliseconds, the group coordinator will wait for more consumers to join a new group before performing the first rebalance. A longer delay means potentially fewer rebalances, but increases the time until processing begins. The default value for this is 3 seconds. During development and testing it might be desirable to set this to 0 in order to not delay test execution time. `group_max_session_timeout_ms` integer optional Example: `1800000` The maximum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. `group_min_session_timeout_ms` integer optional Example: `6000` The minimum allowed session timeout for registered consumers. Longer timeouts give consumers more time to process messages in between heartbeats at the cost of a longer time to detect failures. `log_cleaner_delete_retention_ms` integer optional Example: `86400000` How long are delete records retained? `log_cleaner_max_compaction_lag_ms` integer optional Example: `60000` The maximum amount of time message will remain uncompacted. Only applicable for logs that are being compacted `log_cleaner_min_cleanable_ratio` number optional Example: `0.5` Controls log compactor frequency. Larger value means more frequent compactions but also more space wasted for logs. Consider setting log_cleaner_max_compaction_lag_ms to enforce compactions sooner, instead of setting a very high value for this option. `log_cleaner_min_compaction_lag_ms` integer optional Example: `100000` The minimum time a message will remain uncompacted in the log. Only applicable for logs that are being compacted. `log_cleanup_policy` string, one of: delete, compact, compact,delete optional Example: `delete` The default cleanup policy for segments beyond the retention window `log_flush_interval_messages` integer optional Example: `9223372036854776000` The number of messages accumulated on a log partition before messages are flushed to disk `log_flush_interval_ms` integer optional Example: `1000000` The maximum time in ms that a message in any topic is kept in memory before flushed to disk. If not set, the value in log.flush.scheduler.interval.ms is used `log_index_interval_bytes` integer optional Example: `4096` The interval with which Kafka adds an entry to the offset index `log_index_size_max_bytes` integer optional Example: `10485760` The maximum size in bytes of the offset index `log_message_downconversion_enable` boolean optional Example: `true` This configuration controls whether down-conversion of message formats is enabled to satisfy consume requests. `log_message_timestamp_difference_max_ms` integer optional Example: `1000000` The maximum difference allowed between the timestamp when a broker receives a message and the timestamp specified in the message `log_message_timestamp_type` string, one of: CreateTime, LogAppendTime optional Example: `CreateTime` Define whether the timestamp in the message is message create time or log append time. `log_preallocate` boolean optional Example: `false` Controls whether to preallocate a file when creating a new segment `log_retention_bytes` integer optional Example: `1000000` The maximum size of the log before deleting messages `log_retention_hours` integer optional Example: `1000000` The number of hours to keep a log file before deleting it `log_retention_ms` integer optional Example: `100000000` The number of milliseconds to keep a log file before deleting it (in milliseconds), If not set, the value in log.retention.minutes is used. If set to -1, no time limit is applied. `log_roll_jitter_ms` integer optional Example: `10000000` The maximum jitter to subtract from logRollTimeMillis (in milliseconds). If not set, the value in log.roll.jitter.hours is used `log_roll_ms` integer optional Example: `1000000` The maximum time before a new log segment is rolled out (in milliseconds). `log_segment_bytes` integer optional Example: `100000000` The maximum size of a single log file `log_segment_delete_delay_ms` integer optional Example: `60000` The amount of time to wait before deleting a file from the filesystem `max_connections_per_ip` integer optional Example: `512` The maximum number of connections allowed from each ip address (defaults to 2147483647). `max_incremental_fetch_session_cache_slots` integer optional Example: `1000` The maximum number of incremental fetch sessions that the broker will maintain. `message_max_bytes` integer optional Example: `1048588` The maximum size of message that the server can receive. `min_insync_replicas` integer optional Example: `1` When a producer sets acks to 'all' (or '-1'), min_insync_replicas specifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. `num_partitions` integer optional Example: `10` Number of partitions for autocreated topics `offsets_retention_minutes` integer optional Example: `10080` Log retention window in minutes for offsets topic `producer_purgatory_purge_interval_requests` integer optional Example: `100` The purge interval (in number of requests) of the producer request purgatory (defaults to 1000). `replica_fetch_max_bytes` integer optional Example: `2097152` The number of bytes of messages to attempt to fetch for each partition (defaults to 1048576). This is not an absolute maximum, if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. `replica_fetch_response_max_bytes` integer optional Example: `20971520` Maximum bytes expected for the entire fetch response (defaults to 10485760). Records are fetched in batches, and if the first record batch in the first non-empty partition of the fetch is larger than this value, the record batch will still be returned to ensure that progress can be made. As such, this is not an absolute maximum. `schema_registry` boolean optional Example: `true` Enable creation of schema registry for the Kafka cluster. Schema_registry only works with General Purpose - Dedicated CPU plans. `socket_request_max_bytes` integer optional Example: `20971520` The maximum number of bytes in a socket request (defaults to 104857600). `transaction_remove_expired_transaction_cleanup_interval_ms` integer optional Example: `3600000` The interval at which to remove transactions that have expired due to transactional.id.expiration.ms passing (defaults to 3600000 (1 hour)). `transaction_state_log_segment_bytes` integer optional Example: `104857600` The transaction topic segment bytes should be kept relatively small in order to facilitate faster log compaction and cache loads (defaults to 104857600 (100 mebibytes)). **Opensearch Advanced Config** `action_auto_create_index_enabled` boolean optional Example: `true` Specifices whether to allow automatic creation of indices. `action_destructive_requires_name` boolean optional Example: `false` Specifies whether to require explicit index names when deleting indices. `cluster_max_shards_per_node` integer optional Example: `100` Maximum number of shards allowed per data node. `cluster_routing_allocation_node_concurrent_recoveries` integer optional Example: `2` Maximum concurrent incoming/outgoing shard recoveries (normally replicas) are allowed to happen per node . `enable_security_audit` boolean optional Example: `false` Specifies whether to allow security audit logging. `http_max_content_length_bytes` integer optional Example: `100000000` Maximum content length for HTTP requests to the OpenSearch HTTP API, in bytes. `http_max_header_size_bytes` integer optional Example: `8192` Maximum size of allowed headers, in bytes. `http_max_initial_line_length_bytes` integer optional Example: `4096` Maximum length of an HTTP URL, in bytes. `indices_fielddata_cache_size_percentage` integer optional Example: `3` Maximum amount of heap memory used for field data cache, expressed as a percentage. Decreasing the value too much will increase overhead of loading field data. Increasing the value too much will decrease amount of heap available for other operations. `indices_memory_index_buffer_size_percentage` integer optional Example: `10` Total amount of heap used for indexing buffer before writing segments to disk, expressed as a percentage. Too low value will slow down indexing; too high value will increase indexing performance but causes performance issues for query performance. `indices_memory_max_index_buffer_size_mb` integer optional Example: `48` Maximum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. The default is unbounded. `indices_memory_min_index_buffer_size_mb` integer optional Example: `48` Minimum amount of heap used for indexing buffer before writing segments to disk, in mb. Works in conjunction with indices_memory_index_buffer_size_percentage, each being enforced. `indices_queries_cache_size_percentage` integer optional Example: `10` Maximum amount of heap used for query cache. Too low value will decrease query performance and increase performance for other operations; too high value will cause issues with other functionality. `indices_query_bool_max_clause_count` integer optional Example: `1024` Maximum number of clauses Lucene BooleanQuery can have. Only increase it if necessary, as it may cause performance issues. `indices_recovery_max_concurrent_file_chunks` integer optional Example: `2` Maximum number of file chunks sent in parallel for each recovery. `indices_recovery_max_mb_per_sec` integer optional Example: `40` Limits total inbound and outbound recovery traffic for each node, expressed in mb per second. Applies to both peer recoveries as well as snapshot recoveries (i.e., restores from a snapshot). `ism_enabled` boolean optional Example: `true` Specifies whether ISM is enabled or not. `ism_history_enabled` boolean optional Example: `true` Specifies whether audit history is enabled or not. The logs from ISM are automatically indexed to a logs document. `ism_history_max_age_hours` integer optional Example: `24` Maximum age before rolling over the audit history index, in hours. `ism_history_max_docs` integer optional Example: `2500000` Maximum number of documents before rolling over the audit history index. `ism_history_rollover_check_period_hours` integer optional Example: `8` The time between rollover checks for the audit history index, in hours. `ism_history_rollover_retention_period_days` integer optional Example: `30` Length of time long audit history indices are kept, in days. `keep_index_refresh_interval` boolean optional Example: `true` DigitalOcean automatically resets the `index.refresh_interval` to the default value (once per second) to ensure that new documents are quickly available for search queries. If you are setting your own refresh intervals, you can disable this by setting this field to true. `knn_memory_circuit_breaker_enabled` boolean optional Example: `true` Enable or disable KNN memory circuit breaker. `knn_memory_circuit_breaker_limit` integer optional Example: `60` Maximum amount of memory in percentage that can be used for the KNN index. Defaults to 50% of the JVM heap size. 0 is used to set it to null which can be used to invalidate caches. `override_main_response_version` boolean optional Example: `false` Compatibility mode sets OpenSearch to report its version as 7.10 so clients continue to work. `plugins_alerting_filter_by_backend_roles_enabled` boolean optional Example: `false` Enable or disable filtering of alerting by backend roles. `reindex_remote_whitelist` array of string optional Example: `["255.255.223.233:9200","222.33.222.222:6300"]` Allowlist of remote IP addresses for reindexing. Changing this value will cause all OpenSearch instances to restart. `script_max_compilations_rate` string optional Example: `75/5m` Limits the number of inline script compilations within a period of time. Default is use-context `search_max_buckets` integer optional Example: `10000` Maximum number of aggregation buckets allowed in a single response. `thread_pool_analyze_queue_size` integer optional Example: `10` Size of queue for operations in the analyze thread pool. `thread_pool_analyze_size` integer optional Example: `1` Number of workers in the analyze operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_force_merge_size` integer optional Example: `1` Number of workers in the force merge operation thread pool. This pool is used for forcing a merge between shards of one or more indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_get_queue_size` integer optional Example: `10` Size of queue for operations in the get thread pool. `thread_pool_get_size` integer optional Example: `1` Number of workers in the get operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_search_queue_size` integer optional Example: `10` Size of queue for operations in the search thread pool. `thread_pool_search_size` integer optional Example: `1` Number of workers in the search operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_search_throttled_queue_size` integer optional Example: `10` Size of queue for operations in the search throttled thread pool. `thread_pool_search_throttled_size` integer optional Example: `1` Number of workers in the search throttled operation thread pool. This pool is used for searching frozen indices. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. `thread_pool_write_queue_size` integer optional Example: `10` Size of queue for operations in the write thread pool. `thread_pool_write_size` integer optional Example: `1` Number of workers in the write operation thread pool. Do note this may have maximum value depending on CPU count - value is automatically lowered if set to higher than maximum value. ##### Request: `/v2/databases/{database_cluster_uuid}/config` ### Payload Content type `application/json` ```json { "config": { "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES", "sql_require_primary_key": true } } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"config": {"sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES","sql_require_primary_key": true}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.databases.patch_config(database_cluster_uuid="a7aba9d") ``` #### Responses **200** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve the Public Certificate `/v2/databases/{database_cluster_uuid}/ca` To retrieve the public certificate used to secure the connection to the database cluster send a GET request to `/v2/databases/$DATABASE_ID/ca`. The response will be a JSON object with a `ca` key. This will be set to an object containing the base64 encoding of the public key certificate. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/ca` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/ca" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() ca, _, err := client.Databases.GetCA(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_ca(database_cluster_uuid="aba77ada") ``` #### Responses **200** A JSON object with a key of ca. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `ca` object required **Show child properties** `certificate` string required read-only base64 encoding of the certificate used to secure database connections **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "ca": { "certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUVRVENDQXFtZ0F3SUJBZ0lVRUZZWTdBWFZQS0Raam9jb1lpMk00Y0dvcU0wd0RRWUpLb1pJaHZjTkFRRU0KQlFBd09qRTRNRFlHQTFVRUF3d3ZOek0zT1RaaE1XRXRaamhrTUMwME9HSmpMV0V4Wm1NdFpqbGhNVFZsWXprdwpORGhsSUZCeWIycGxZM1FnUTBFd0hoY05NakF3TnpFM01UVTFNREEyV2hjTk16QXdOekUxTVRVMU1EQTJXakE2Ck1UZ3dOZ1lEVlFRRERDODNNemM1Tm1FeFlTMW1PR1F3TFRRNFltTXRZVEZtWXkxbU9XRXhOV1ZqT1RBME9HVWcKVUhKdmFtVmpkQ0JEUVRDQ0FhSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnR1BBRENDQVlvQ2dnR0JBTVdScXhycwpMZnpNdHZyUmxKVEw4MldYMVBLZkhKbitvYjNYcmVBY3FZd1dBUUp2Q3IycmhxSXZieVZzMGlaU0NzOHI4c3RGClljQ0R1bkxJNmUwTy9laERZYTBIT2RrMkFFRzE1ckVOVmNha2NSczcyQWlHVHNrdkNXS2VkUjFTUWswVWt0WCsKQUg4S1ExS3F5bzNtZ2Y2cVV1WUpzc3JNTXFselk3YTN1RVpEb2ZqTjN5Q3MvM21pTVJKcVcyNm1JV0IrUUlEbAo5YzdLRVF5MTZvdCtjeHVnd0lLMm9oZHMzaFY1bjBKMFVBM0I3QWRBdXY5aUl5L3JHaHlTNm5CNTdaWm9JZnAyCnFybXdOY0UrVjlIdXhQSGtRVjFOQjUwOFFudWZ4Z0E5VCtqU2VrdGVUbWFORkxqNjFXL3BtcndrTytOaWFXUTIKaGgzVXBKOEozY1BoNkErbHRnUmpSV2NEb2lsYVNwRVVpU09WemNNYVFvalZKYVJlNk9NbnZYc29NaSs3ZzdneApWcittQ0lUcGcvck9DaXpBWWQ2UFAxLzdYTjk1ZXNmU2tBQnM5c3hJakpjTUFqbDBYTEFzRmtGZVdyeHNIajlVCmJnaDNWYXdtcnpUeXhZT0RQcXV1cS9JcGlwc0RRT3Fpb2ZsUStkWEJJL3NUT0NNbVp6K0pNcG5HYXdJREFRQUIKb3o4d1BUQWRCZ05WSFE0RUZnUVVSekdDRlE3WEtUdHRDN3JzNS8ydFlQcExTZGN3RHdZRFZSMFRCQWd3QmdFQgovd0lCQURBTEJnTlZIUThFQkFNQ0FRWXdEUVlKS29aSWh2Y05BUUVNQlFBRGdnR0JBSWFKQ0dSVVNxUExtcmcvCmk3MW10b0NHUDdzeG1BVXVCek1oOEdrU25uaVdaZnZGMTRwSUtqTlkwbzVkWmpHKzZqK1VjalZtK0RIdGE1RjYKOWJPeEk5S0NFeEI1blBjRXpMWjNZYitNOTcrellxbm9zUm85S21DVFJBb2JrNTZ0WU1FS1h1aVJja2tkMm1yUQo4cGw2N2xxdThjM1V4c0dHZEZVT01wMkk3ZTNpdUdWVm5UR0ZWM3JQZUdaQ0J3WGVyUUQyY0F4UjkzS3BnWVZ2ClhUUzk5dnpSbm1HOHhhUm9EVy9FbEdXZ2xWd0Q5a1JrbXhUUkdoYTdDWVZCcjFQVWY2dVVFVjhmVFIxc1hFZnIKLytMR1JoSVVsSUhWT3l2Yzk3YnZYQURPbWF1MWZDVE5lWGtRdTNyZnZFSlBmaFlLeVIwT0V3eWVvdlhRNzl0LwpTV2ZGTjBreU1Pc1UrNVNIdHJKSEh1eWNWcU0yQlVVK083VjM1UnNwOU9MZGRZMFFVbTZldFpEVEhhSUhYYzRRCnl1Rm1OL1NhSFZtNE0wL3BTVlJQdVd6TmpxMnZyRllvSDRtbGhIZk95TUNJMjc2elE2aWhGNkdDSHlkOUJqajcKUm1UWGEyNHM3NWhmSi9YTDV2bnJSdEtpVHJlVHF6V21EOVhnUmNMQ0gyS1hJaVRtSWc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve the Status of an Online Migration `/v2/databases/{database_cluster_uuid}/online-migration` To retrieve the status of the most recent online migration, send a GET request to `/v2/databases/$DATABASE_ID/online-migration`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/online-migration` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_migration_status(database_cluster_uuid="a7a7ab90") ``` #### Responses **200** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `created_at` string optional Example: `2020-10-29T15:57:38Z` The time the migration was initiated, in ISO 8601 format. `id` string optional Example: `77b28fc8-19ff-11eb-8c9c-c68e24557488` The ID of the most recent migration. `status` string, one of: running, syncing, canceled, error, done optional Example: `running` The current status of the migration. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "created_at": "2020-10-29T15:57:38Z", "id": "77b28fc8-19ff-11eb-8c9c-c68e24557488", "status": "running" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Start an Online Migration `/v2/databases/{database_cluster_uuid}/online-migration` To start an online migration, send a PUT request to `/v2/databases/$DATABASE_ID/online-migration` endpoint. Migrating a cluster establishes a connection with an existing cluster and replicates its contents to the target cluster. Online migration is only available for MySQL, PostgreSQL, Caching, and Valkey clusters. If the existing database is continuously being written to, the migration process will continue for up to two weeks unless it is manually stopped. Online migration is only available for [MySQL](https://docs.digitalocean.com/products/databases/mysql/how-to/migrate/index.html.md#:~:text=To%20migrate%20a%20MySQL%20database,then%20select%20Set%20Up%20Migration), [PostgreSQL](https://docs.digitalocean.com/products/databases/postgresql/how-to/migrate/index.html.md), [Caching](https://docs.digitalocean.com/products/databases/redis/how-to/migrate/index.html.md), and [Valkey](https://docs.digitalocean.com/products/databases/valkey/how-to/migrate/index.html.md) clusters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `disable_ssl` boolean optional Example: `false` Enables SSL encryption when connecting to the source database. `ignore_dbs` array of string optional Example: `["db0","db1"]` List of databases that should be ignored during migration. `source` object required **Show child properties** `dbname` string optional Example: `defaultdb` The name of the default database. `host` string optional Example: `db.example.com` The FQDN pointing to the database cluster's current primary node. `password` string optional Example: `example_password` The randomly generated password for the default user. `port` integer optional Example: `25060` The port on which the database cluster is listening. `username` string optional Example: `doadmin` The default user for the database. ##### Request: `/v2/databases/{database_cluster_uuid}/online-migration` ### Payload Content type `application/json` ```json { "disable_ssl": false, "ignore_dbs": [ "db0", "db1" ], "source": { "dbname": "defaultdb", "host": "source-db.example.com", "password": "example_password", "port": 25060, "username": "doadmin" } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"source":{"host":"source-db.example.com","dbname":"defaultdb","port":25060,"username":"doadmin","password":"example_password"},"disable_ssl":false,"ignore_dbs":["db0","db1"]}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "source": { "host": "source-db.example.com", "dbname": "defaultdb", "port": 25060, "username": "doadmin", "password": "example_password" }, "disable_ssl": False "ignore_dbs": ["db0","db1"] } update_resp = client.databases.update_online_migration(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **200** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `created_at` string optional Example: `2020-10-29T15:57:38Z` The time the migration was initiated, in ISO 8601 format. `id` string optional Example: `77b28fc8-19ff-11eb-8c9c-c68e24557488` The ID of the most recent migration. `status` string, one of: running, syncing, canceled, error, done optional Example: `running` The current status of the migration. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "created_at": "2020-10-29T15:57:38Z", "id": "77b28fc8-19ff-11eb-8c9c-c68e24557488", "status": "running" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Stop an Online Migration `/v2/databases/{database_cluster_uuid}/online-migration/{migration_id}` To stop an online migration, send a DELETE request to `/v2/databases/$DATABASE_ID/online-migration/$MIGRATION_ID`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `migration_id` string required Example: `77b28fc8-19ff-11eb-8c9c-c68e24557488` A unique identifier assigned to the online migration. ##### Request: `/v2/databases/{database_cluster_uuid}/online-migration/{migration_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/online-migration/77b28fc8-19ff-11eb-8c9c-c68e24557488" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete_online_migration(database_cluster_uuid="9cc10173", migration="77b28fc8") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Migrate a Database Cluster to a New Region `/v2/databases/{database_cluster_uuid}/migrate` To migrate a database cluster to a new region, send a `PUT` request to `/v2/databases/$DATABASE_ID/migrate`. The body of the request must specify a `region` attribute. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its `status` attribute will now be set to `migrating`. This will transition back to `online` when the migration has completed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `region` string required Example: `lon1` A slug identifier for the region to which the database cluster will be migrated. ##### Request: `/v2/databases/{database_cluster_uuid}/migrate` ### Payload Content type `application/json` ```json { "region": "lon1" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"region":"lon1"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/migrate" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() migrateRequest := &godo.DatabaseMigrateRequest{ Region: "lon1", } _, err := client.Databases.Migrate(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", migrateRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "region": "lon1" } update_resp = client.databases.update_region(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **202** This does not indicate the success or failure of any operation, just that the request has been accepted for processing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Resize a Database Cluster `/v2/databases/{database_cluster_uuid}/resize` To resize a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/resize`. The body of the request must specify both the size and num_nodes attributes. A successful request will receive a 202 Accepted status code with no body in response. Querying the database cluster will show that its status attribute will now be set to resizing. This will transition back to online when the resize operation has completed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `num_nodes` integer (int32) required Example: `3` The number of nodes in the database cluster. Valid values are are 1-3. In addition to the primary node, up to two standby nodes may be added for highly available configurations. `size` string required Example: `db-s-4vcpu-8gb` A slug identifier representing desired the size of the nodes in the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. ##### Request: `/v2/databases/{database_cluster_uuid}/resize` ### Payload Content type `application/json` ```json { "num_nodes": 3, "size": "db-s-4vcpu-8gb", "storage_size_mib": 163840 } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"size":"db-s-4vcpu-8gb", "num_nodes":3, "storage_size_mib":163840}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/resize" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() resizeRequest := &godo.DatabaseResizeRequest{ SizeSlug: "db-s-4vcpu-8gb", NumNodes: 3, StorageSizeMib: 163840, } } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "size": "db-s-4vcpu-8gb", "num_nodes": 3, "storage_size_mib": 163840 } update_resp = client.databases.update_cluster_size(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **202** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Firewall Rules (Trusted Sources) for a Database Cluster `/v2/databases/{database_cluster_uuid}/firewall` To list all of a database cluster's firewall rules (known as "trusted sources" in the control panel), send a GET request to `/v2/databases/$DATABASE_ID/firewall`. The result will be a JSON object with a `rules` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/firewall` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() rules, _, err := client.Databases.GetFirewallRules(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_firewall_rules(database_cluster_uuid="a7aab9a") ``` #### Responses **200** A JSON object with a key of rules. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "rules": [ { "cluster_uuid": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "created_at": "2019-11-14T20:30:28Z", "type": "k8s", "uuid": "79f26d28-ea8a-41f2-8ad8-8cfcdd020095", "value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61" }, { "cluster_uuid": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "created_at": "2019-11-14T20:30:28Z", "description": "a development IP address", "type": "ip_addr", "uuid": "adfe81a8-0fa1-4e2d-973f-06aa5af19b44", "value": "192.168.1.1" }, { "cluster_uuid": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "created_at": "2019-11-14T20:30:28Z", "type": "droplet", "uuid": "b9b42276-8295-4313-b40f-74173a7f46e6", "value": "163973392" }, { "cluster_uuid": "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "created_at": "2019-11-14T20:30:28Z", "type": "tag", "uuid": "718d23e0-13d7-4129-8a00-47fb72ee0deb", "value": "backend" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Firewall Rules (Trusted Sources) for a Database `/v2/databases/{database_cluster_uuid}/firewall` To update a database cluster's firewall rules (known as "trusted sources" in the control panel), send a PUT request to `/v2/databases/$DATABASE_ID/firewall` specifying which resources should be able to open connections to the database. You may limit connections to specific Droplets, Kubernetes clusters, or IP addresses. When a tag is provided, any Droplet or Kubernetes node with that tag applied to it will have access. The firewall is limited to 100 rules (or trusted sources). You cannot add IPv6 addresses as trusted sources. For additional limits, see your database engine's limits page. When possible, we recommend [placing your databases into a VPC network](https://docs.digitalocean.com/products/networking/vpc/index.html.md) to limit access to them instead of using a firewall. A successful request returns a 204 status code with no content. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `rules` array of object optional **Show child properties** `cluster_uuid` string optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID for the database cluster to which the rule is applied. `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the firewall rule was created. `description` string optional Example: `an IP address for local development` A human-readable description of the rule. `type` string, one of: droplet, k8s, ip_addr, tag, app required Example: `droplet` The type of resource that the firewall rule allows to access the database cluster. `uuid` string optional Example: `79f26d28-ea8a-41f2-8ad8-8cfcdd020095` A unique ID for the firewall rule itself. `value` string required Example: `ff2a6c52-5a44-4b63-b99c-0e98e7a63d61` The ID of the specific resource, the name of a tag applied to a group of resources, or the IP address that the firewall rule allows to access the database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/firewall` ### Payload Content type `application/json` ```json { "rules": [ { "type": "ip_addr", "value": "192.168.1.1" }, { "type": "k8s", "value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61" }, { "type": "droplet", "value": "163973392" }, { "description": "a backend tag", "type": "tag", "value": "backend" } ] } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"rules": [{"type": "ip_addr","value": "192.168.1.1"},{"type": "droplet","value": "163973392"},{"type": "k8s","value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61"},{"type": "tag","value": "backend"}]}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/firewall" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() req := godo.DatabaseUpdateFirewallRulesRequest{ Rules: []*godo.DatabaseFirewallRule{ { Type: "ip_addr", Value: "192.168.1.1", Description: "a development IP address", }, { Type: "droplet", Value: "163973392", }, { Type: "k8s", Value: "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61", }, }, } _, err := client.Databases.UpdateFirewallRules(ctx, dbID, &req) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "rules": [ { "type": "ip_addr", "value": "192.168.1.1", "description": "a development IP address", }, { "type": "k8s", "value": "ff2a6c52-5a44-4b63-b99c-0e98e7a63d61" }, { "type": "droplet", "value": "163973392" }, { "type": "tag", "value": "backend" } ] } update_resp = client.databases.update_firewall_rules(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve DO Settings for a Database Cluster `/v2/databases/{database_cluster_uuid}/do_settings` To retrieve the DigitalOcean-specific settings for a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/do_settings`. The response will include the current `service_cnames` configuration. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/do_settings` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/do_settings" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() doSettings, _, err := client.Databases.GetDOSettings(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.databases.get_do_settings(database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") ``` #### Responses **200** A JSON object with a key of do_settings. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `do_settings` object required DigitalOcean-specific settings for the database cluster. **Show child properties** `service_cnames` array of string optional Example: `["db.example.com","database.myapp.io"]` An array of custom CNAMEs for the database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253 characters. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "do_settings": { "service_cnames": [ "db.example.com", "api.myapp.io" ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update DO Settings for a Database Cluster `/v2/databases/{database_cluster_uuid}/do_settings` To update the DigitalOcean-specific settings for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/do_settings`. Currently, the only supported setting is `service_cnames`, which allows you to specify custom DNS names (CNAMEs) to be included in the TLS certificate Subject Alternative Names (SANs) for the database cluster nodes. This enables TLS verification when connecting via a custom hostname. After updating, the database nodes will be replaced to apply the new certificate. This process is performed as a rolling replacement and does not cause downtime. To clear all custom CNAMEs, send an empty array or omit the field. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `do_settings` object required DigitalOcean-specific settings for the database cluster. **Show child properties** `service_cnames` array of string optional Example: `["db.example.com","database.myapp.io"]` An array of custom CNAMEs for the database cluster. Each CNAME must be a valid RFC 1123 hostname (e.g., "db.example.com"). Maximum of 16 CNAMEs allowed, each up to 253 characters. ##### Request: `/v2/databases/{database_cluster_uuid}/do_settings` ### Payload Content type `application/json` ```json { "do_settings": { "service_cnames": [ "db.example.com", "db-replica.example.com" ] } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"do_settings": {"service_cnames": ["db.example.com", "db-replica.example.com"]}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/do_settings" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() dbID := "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30" req := godo.DatabaseUpdateDOSettingsRequest{ DOSettings: &godo.DOSettings{ ServiceCnames: []string{ "db.example.com", "db-replica.example.com", }, }, } _, err := client.Databases.UpdateDOSettings(ctx, dbID, &req) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "do_settings": { "service_cnames": ["db.example.com", "db-replica.example.com"] } } resp = client.databases.update_do_settings( database_cluster_uuid="9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", body=req ) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Configure a Database Cluster's Maintenance Window `/v2/databases/{database_cluster_uuid}/maintenance` To configure the window when automatic maintenance should be performed for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/maintenance`. A successful request will receive a 204 No Content status code with no body in response. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `day` string required Example: `tuesday` The day of the week on which to apply maintenance updates. `description` array of string optional read-only Example: `["Update TimescaleDB to version 1.2.1","Upgrade to PostgreSQL 11.2 and 10.7 bugfix releases"]` A list of strings, each containing information about a pending maintenance update. `hour` string required Example: `14:00` The hour in UTC at which maintenance updates will be applied in 24 hour format. `pending` boolean optional read-only Example: `true` A boolean value indicating whether any maintenance is scheduled to be performed in the next window. ##### Request: `/v2/databases/{database_cluster_uuid}/maintenance` ### Payload Content type `application/json` ```json { "day": "tuesday", "hour": "14:00" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"day": "tuesday", "hour": "14:00"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/maintenance" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() maintenanceRequest := &godo.DatabaseUpdateMaintenanceRequest{ Day: "thursday", Hour: "16:00", } _, err := client.Databases.UpdateMaintenance(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2", maintenanceRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "day": "tuesday", "hour": "14:00" } update_resp = client.databases.update_maintenance_window(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Start Database Maintenance `/v2/databases/{database_cluster_uuid}/install_update` To start the installation of updates for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/install_update`. A successful request will receive a 204 No Content status code with no body in response. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/install_update` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/install_update" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Databases.InstallUpdate(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) update_resp = client.databases.install_update(database_cluster_uuid="a7a8bas") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Backups for a Database Cluster `/v2/databases/{database_cluster_uuid}/backups` To list all of the available backups of a PostgreSQL or MySQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/backups`. **Note**: Backups are not supported for Caching or Valkey clusters. The result will be a JSON object with a `backups key`. This will be set to an array of backup objects, each of which will contain the size of the backup and the timestamp at which it was created. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/backups` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/backups" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() backups, _, err := client.Databases.ListBackups(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_backups(database_cluster_uuid="a9a8a77") ``` #### Responses **200** A JSON object with a key of backups. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `backup_progress` string optional Example: `36` If a backup is currently in progress, this attribute shows the percentage of completion. If no backup is in progress, this attribute will be hidden. `backups` array of object required **Show child properties** `created_at` string (date-time) required Example: `2019-01-31T19:25:22Z` A time value given in ISO8601 combined date and time format at which the backup was created. `incremental` boolean optional Example: `false` Indicates if this backup is a full or an incremental one (available only for MySQL). `size_gigabytes` number required Example: `0.03364864` The size of the database backup in GBs. `scheduled_backup_time` object optional **Show child properties** `backup_hour` integer optional Example: `20` The hour of the day when the backup is scheduled (in UTC). `backup_interval_hours` integer optional Example: `24` The frequency, in hours, at which backups are taken. `backup_minute` integer optional Example: `40` The minute of the hour when the backup is scheduled. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "backup_progress": "36", "backups": [ { "created_at": "2019-01-11T18:42:27Z", "incremental": false, "size_gigabytes": 0.03357696 }, { "created_at": "2019-01-12T18:42:29Z", "incremental": true, "size_gigabytes": 0.03364864 } ], "scheduled_backup_time": { "backup_hour": 20, "backup_interval_hours": 24, "backup_minute": 40 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Read-only Replicas `/v2/databases/{database_cluster_uuid}/replicas` To list all of the read-only replicas associated with a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/replicas`. **Note**: Read-only replicas are not supported for Caching or Valkey clusters. The result will be a JSON object with a `replicas` key. This will be set to an array of database replica objects, each of which will contain the standard database replica attributes. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/replicas` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replicas, _, err := client.Databases.ListReplicas(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_replicas(database_cluster_uuid="a7aba3") ``` #### Responses **200** A JSON object with a key of replicas. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `replicas` array of object optional **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `do_settings` object optional `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database replica. `name` string required Example: `read-nyc3-01` The name to give the read-only replicating `private_connection` object optional `private_network_uuid` string optional Example: `9423cbad-9211-442f-820b-ef6915e99b5f` A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `region` string optional Example: `nyc3` A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. `size` string optional Example: `db-s-2vcpu-4gb` A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Example: `["production"]` A flat array of tag names as strings applied to the read-only replica. Requires `tag:read` scope. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "replicas": [ { "connection": { "database": "defaultdb", "host": "read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "name": "read-nyc3-01", "private_connection": { "database": "", "host": "private-read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-read-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "region": "nyc3", "status": "online" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Read-only Replica `/v2/databases/{database_cluster_uuid}/replicas` To create a read-only replica for a PostgreSQL or MySQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/replicas` specifying the name it should be given, the size of the node to be used, and the region where it will be located. **Note**: Read-only replicas are not supported for Caching or Valkey clusters. The response will be a JSON object with a key called `replica`. The value of this will be an object that contains the standard attributes associated with a database replica. The initial value of the read-only replica's `status` attribute will be `forking`. When the replica is ready to receive traffic, this will transition to `active`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `do_settings` object optional `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database replica. `name` string required Example: `read-nyc3-01` The name to give the read-only replicating `private_connection` object optional `private_network_uuid` string optional Example: `9423cbad-9211-442f-820b-ef6915e99b5f` A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `region` string optional Example: `nyc3` A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. `size` string optional Example: `db-s-2vcpu-4gb` A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Example: `["production"]` A flat array of tag names as strings to apply to the read-only replica after it is created. Tag names can either be existing or new tags. Requires `tag:create` scope. ##### Request: `/v2/databases/{database_cluster_uuid}/replicas` ### Payload Content type `application/json` Example ```json { "name": "read-nyc3-01", "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440 } ``` ```json { "do_settings": { "service_cnames": [ "replica-db.example.com", "read-replica.myapp.io" ] }, "name": "read-nyc3-01", "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"read-nyc3-01", "region":"nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "do_settings": {"service_cnames": ["replica-db.example.com", "read-replica.myapp.io"]}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replicaRequest := &godo.DatabaseCreateReplicaRequest{ Name: "read-nyc3-01", Region: "nyc3", Size: "db-s-2vcpu-4gb", StorageSizeMiB: 61440, DOSettings: &godo.DOSettings{ ServiceCnames: []string{"replica-db.example.com", "read-replica.myapp.io"}, }, } replica, _, err := client.Databases.CreateReplica(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", replicaRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) create_req = { "name": "read-nyc3-01", "region": "nyc3", "size": "db-s-2vcpu-4gb", "storage_size_mib": 61440, "do_settings": { "service_cnames": [ "replica-db.example.com", "read-replica.myapp.io" ] } } create_resp = client.databases.create_replica(database_cluster_uuid="9cc10173", body=create_req) ``` #### Responses **201** A JSON object with a key of replica. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `replica` object optional **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `do_settings` object optional `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database replica. `name` string required Example: `read-nyc3-01` The name to give the read-only replicating `private_connection` object optional `private_network_uuid` string optional Example: `9423cbad-9211-442f-820b-ef6915e99b5f` A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `region` string optional Example: `nyc3` A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. `size` string optional Example: `db-s-2vcpu-4gb` A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Example: `["production"]` A flat array of tag names as strings applied to the read-only replica. Requires `tag:read` scope. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "replica": { "connection": { "database": "defaultdb", "host": "read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "do_settings": { "service_cnames": [ "replica-db.example.com", "read-replica.myapp.io" ] }, "name": "read-nyc3-01", "private_connection": { "database": "", "host": "private-read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-read-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "region": "nyc3", "status": "online" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List all Events Logs `/v2/databases/{database_cluster_uuid}/events` To list all of the cluster events, send a GET request to `/v2/databases/$DATABASE_ID/events`. The result will be a JSON object with a `events` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/events` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/events" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replicas, _, err := client.Databases.ListProjectEvents(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` #### Responses **200** A JSON object with a key of events. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `events` array of object optional **Show child properties** `cluster_name` string optional Example: `sample_cluster` The name of cluster. `create_time` string optional Example: `2020-10-29T15:57:38Z` The time of the generation of a event. `event_type` string (enum) optional Example: `cluster_create` Type of the event. `id` string optional Example: `pe8u2huh` ID of the particular event. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "events": [ { "cluster_name": "customer-events", "create_time": "2020-10-29T15:57:38Z", "event_type": "cluster_create", "id": "pe8u2huh" }, { "cluster_name": "customer-events", "create_time": "2023-10-30T15:57:38Z", "event_type": "cluster_update", "id": "pe8ufefuh" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Read-only Replica `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}` To show information about an existing database replica, send a GET request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. **Note**: Read-only replicas are not supported for Caching or Valkey clusters. The response will be a JSON object with a `replica key`. This will be set to an object containing the standard database replica attributes. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `replica_name` string required Example: `read-nyc3-01` The name of the database replica. ##### Request: `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replica, _, err := client.Databases.GetReplica(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "read-nyc3-01") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_replica(database_cluster_uuid="a7a90a", replica_name="backend-replica") ``` #### Responses **200** A JSON object with a key of replica. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `replica` object optional **Show child properties** `connection` object optional `created_at` string (date-time) optional read-only Example: `2019-01-11T18:37:36Z` A time value given in ISO8601 combined date and time format that represents when the database cluster was created. `do_settings` object optional `id` string (uuid) optional read-only Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique ID that can be used to identify and reference a database replica. `name` string required Example: `read-nyc3-01` The name to give the read-only replicating `private_connection` object optional `private_network_uuid` string optional Example: `9423cbad-9211-442f-820b-ef6915e99b5f` A string specifying the UUID of the VPC to which the read-only replica will be assigned. If excluded, the replica will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `region` string optional Example: `nyc3` A slug identifier for the region where the read-only replica will be located. If excluded, the replica will be placed in the same region as the cluster. `size` string optional Example: `db-s-2vcpu-4gb` A slug identifier representing the size of the node for the read-only replica. The size of the replica must be at least as large as the node size for the database cluster from which it is replicating. `status` string, one of: creating, online, resizing, migrating, forking optional read-only Example: `creating` A string representing the current status of the database cluster. `storage_size_mib` integer optional Example: `61440` Additional storage added to the cluster, in MiB. If null, no additional storage is added to the cluster, beyond what is provided as a base amount from the 'size' and any previously added additional storage. `tags` array of string optional Example: `["production"]` A flat array of tag names as strings applied to the read-only replica. Requires `tag:read` scope. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "replica": { "connection": { "database": "defaultdb", "host": "read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "", "user": "doadmin" }, "created_at": "2019-01-11T18:37:36Z", "do_settings": { "service_cnames": [ "replica-db.example.com", "read-replica.myapp.io" ] }, "name": "read-nyc3-01", "private_connection": { "database": "", "host": "private-read-db.example.com", "password": "example_password", "port": 25060, "ssl": true, "uri": "postgres://doadmin:example_password@private-read-db.example.com:25060/defaultdb?sslmode=require", "user": "doadmin" }, "region": "nyc3", "status": "online" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Destroy a Read-only Replica `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}` To destroy a specific read-only replica, send a DELETE request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME`. **Note**: Read-only replicas are not supported for Caching or Valkey clusters. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `replica_name` string required Example: `read-nyc3-01` The name of the database replica. ##### Request: `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Databases.DeleteReplica(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "read-nyc3-01") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.destroy_replica(database_cluster_uuid="ba88aab", replica_name="read_nyc_3") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Promote a Read-only Replica to become a Primary Cluster `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote` To promote a specific read-only replica, send a PUT request to `/v2/databases/$DATABASE_ID/replicas/$REPLICA_NAME/promote`. **Note**: Read-only replicas are not supported for Caching or Valkey clusters. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `replica_name` string required Example: `read-nyc3-01` The name of the database replica. ##### Request: `/v2/databases/{database_cluster_uuid}/replicas/{replica_name}/promote` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/replicas/read-nyc3-01/promote" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Databases.PromoteReplicaToPrimary(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "read-nyc3-01") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.databases.promote_replica(database_cluster_uuid="a7a8bas", replica_name="ba8ab22") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List all Database Users `/v2/databases/{database_cluster_uuid}/users` To list all of the users for your database cluster, send a GET request to `/v2/databases/$DATABASE_ID/users`. Note: User management is not supported for Caching or Valkey clusters. The result will be a JSON object with a `users` key. This will be set to an array of database user objects, each of which will contain the standard database user attributes. User passwords will not show without the `database:view_credentials` scope. For MySQL clusters, additional options will be contained in the mysql_settings object. For PostgreSQL clusters, additional options will be contained in the `settings` object (for example, `pg_allow_replication`). For Kafka clusters, additional options will be contained in the `settings` object. For MongoDB clusters, additional information will be contained in the mongo_user_settings object #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/users` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() users, _, err := client.Databases.ListUsers(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2", nil) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_users(database_cluster_uuid="a7aba3") ``` #### Responses **200** A JSON object with a key of users. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `users` array of object optional **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "users": [ { "name": "app-01", "password": "example_password", "role": "normal" }, { "name": "app-02", "password": "example_password_2", "role": "normal", "settings": { "pg_allow_replication": true } }, { "name": "doadmin", "password": "example_password", "role": "primary" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add a Database User `/v2/databases/{database_cluster_uuid}/users` To add a new database user, send a POST request to `/v2/databases/$DATABASE_ID/users` with the desired username. Note: User management is not supported for Caching or Valkey clusters. When adding a user to a MySQL cluster, additional options can be configured in the `mysql_settings` object. When adding a user to a PostgreSQL cluster, additional options can be configured in the `settings` object (for example, `pg_allow_replication`). When `pg_allow_replication` is omitted, it defaults to `false`. When adding a user to a Kafka cluster, additional options can be configured in the `settings` object. When adding a user to a MongoDB cluster, additional options can be configured in the `settings.mongo_user_settings` object. The response will be a JSON object with a key called `user`. The value of this will be an object that contains the standard attributes associated with a database user including its randomly generated password. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. `readonly` boolean optional Example: `true` (To be deprecated: use settings.mongo_user_settings.role instead for access controls to MongoDB databases). For MongoDB clusters, set to `true` to create a read-only user. This option is not currently supported for other database engines. ##### Request: `/v2/databases/{database_cluster_uuid}/users` ### Payload Content type `application/json` Example ```json { "name": "my-readonly", "readonly": true } ``` ```json { "name": "app-01" } ``` ```json { "name": "app-02", "settings": { "pg_allow_replication": true } } ``` ```json { "name": "my-readWrite", "settings": { "mongo_user_settings": { "databases": [ "my-db", "my-db-2" ], "role": "readWrite" } } } ``` ```json { "name": "app-03", "settings": { "acl": [ { "permission": "produceconsume", "topic": "customer-events" }, { "permission": "produce", "topic": "customer-events.*" }, { "permission": "consume", "topic": "customer-events" } ] } } ``` ```json { "mysql_settings": { "auth_plugin": "mysql_native_password" }, "name": "app-02" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "app-01"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() addUserRequest := &godo.DatabaseCreateUserRequest{ Name: "app-01", } user, _, err := client.Databases.CreateUser(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2", addUserRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) add_user_resp = client.databases.add_user(database_cluster_uuid="ab7bb7a", body={"name": "app-01"}) ``` #### Responses **201** A JSON object with a key of user. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `user` object required **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** Example ```json { "user": { "access_cert": "-----BEGIN CERTIFICATE-----\nMIIEexampleCertificateNotForProductionUseOnly\n-----END CERTIFICATE-----", "access_key": "-----BEGIN PRIVATE KEY-----\nMIIEexamplePrivateKeyNotForProductionUseOnly\n-----END PRIVATE KEY-----", "name": "app-03", "password": "example_password", "role": "normal", "settings": { "acl": [ { "id": "acl128aaaa99239", "permission": "produceconsume", "topic": "customer-events" }, { "id": "acl293098flskdf", "permission": "produce", "topic": "customer-events.*" }, { "id": "acl128ajei20123", "permission": "consume", "topic": "customer-events" } ] } } } ``` ```json { "user": { "name": "app-01", "password": "example_password", "role": "normal" } } ``` ```json { "user": { "name": "app-02", "password": "example_password", "role": "normal", "settings": { "pg_allow_replication": true } } } ``` ```json { "user": { "mysql_settings": { "auth_plugin": "mysql_native_password" }, "name": "app-02", "password": "example_password", "role": "normal" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Database User `/v2/databases/{database_cluster_uuid}/users/{username}` To show information about an existing database user, send a GET request to `/v2/databases/$DATABASE_ID/users/$USERNAME`. Note: User management is not supported for Caching or Valkey clusters. The response will be a JSON object with a `user` key. This will be set to an object containing the standard database user attributes. The user's password will not show up unless the `database:view_credentials` scope is present. For MySQL clusters, additional options will be contained in the `mysql_settings` object. For PostgreSQL clusters, additional options will be contained in the `settings` object (for example, `pg_allow_replication`). For Kafka clusters, additional options will be contained in the `settings` object. For MongoDB clusters, additional information will be contained in the mongo_user_settings object #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `username` string required Example: `app-01` The name of the database user. ##### Request: `/v2/databases/{database_cluster_uuid}/users/{username}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() user, _, err := client.Databases.GetUser(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "app-01") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_user(database_cluster_uuid="9a9aba", username="admin") ``` #### Responses **200** A JSON object with a key of user. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `user` object required **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "user": { "access_cert": "-----BEGIN CERTIFICATE-----\nMIIEexampleCertificateNotForProductionUseOnly\n-----END CERTIFICATE-----", "access_key": "-----BEGIN PRIVATE KEY-----\nMIIEexamplePrivateKeyNotForProductionUseOnly\n-----END PRIVATE KEY-----", "name": "app-03", "password": "example_password", "role": "normal", "settings": { "acl": [ { "id": "acl128aaaa99239", "permission": "produceconsume", "topic": "customer-events" }, { "id": "acl293098flskdf", "permission": "produce", "topic": "customer-events.*" }, { "id": "acl128ajei20123", "permission": "consume", "topic": "customer-events" } ] } } } ``` ```json { "user": { "name": "app-01", "password": "example_password", "role": "normal" } } ``` ```json { "user": { "name": "app-02", "password": "example_password", "role": "normal", "settings": { "pg_allow_replication": true } } } ``` ```json { "user": { "mysql_settings": { "auth_plugin": "mysql_native_password" }, "name": "app-02", "password": "example_password", "role": "normal" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Database User `/v2/databases/{database_cluster_uuid}/users/{username}` To update an existing database user, send a PUT request to `/v2/databases/$DATABASE_ID/users/$USERNAME` with the desired settings. **Note**: only `settings` can be updated via this type of request. If you wish to change the name of a user, you must recreate a new user. For PostgreSQL clusters, you can update `settings.pg_allow_replication` to enable or disable replication privileges for the user. When omitted, the value defaults to `false`. For Kafka and OpenSearch clusters, additional options can be configured in the `settings` object (for example, topic or index ACLs). Updating users is supported for PostgreSQL, Kafka, and OpenSearch clusters. For other engines, the request returns a 422. MongoDB roles and database access are set with `settings.mongo_user_settings` when creating a user and cannot be changed afterward; recreate the user to apply different roles or databases. The response will be a JSON object with a key called `user`. The value of this will be an object that contains the name of the updated database user, along with the `settings` object that has been updated. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `username` string required Example: `app-01` The name of the database user. #### Request Body: `application/json` `settings` object optional User settings that can be updated via the Update a Database User endpoint. Supported for PostgreSQL, Kafka, and OpenSearch clusters. For other engines, the request returns a 422. MongoDB user roles and database access (`mongo_user_settings`) cannot be updated after creation; recreate the user to change them. **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. ##### Request: `/v2/databases/{database_cluster_uuid}/users/{username}` ### Payload Content type `application/json` Example ```json { "settings": { "acl": [ { "id": "acl128aaaa99239", "permission": "produceconsume", "topic": "customer-events" }, { "id": "acl293098flskdf", "permission": "produce", "topic": "customer-events.*" }, { "id": "acl128ajei20123", "permission": "consume", "topic": "customer-events" } ] } } ``` ```json { "settings": { "pg_allow_replication": true } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"settings": {"acl": [{"topic": "events", "permission": "produce"}]}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() userName := "test-user" updateUserRequest := &godo.DatabaseUpdateUserRequest{ Settings: { ACL: [ { Permssion: "consume", Topic: "events", } { Permission: "produce", Topic: "metrics", } ] } } user, _, err := client.Databases.UpdateUser(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2", userName, updateUserRequest) } ``` #### Responses **201** A JSON object with a key of user. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `user` object required **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** Example ```json { "user": { "access_cert": "-----BEGIN CERTIFICATE-----\nMIIEexampleCertificateNotForProductionUseOnly\n-----END CERTIFICATE-----", "access_key": "-----BEGIN PRIVATE KEY-----\nMIIEexamplePrivateKeyNotForProductionUseOnly\n-----END PRIVATE KEY-----", "name": "app-03", "password": "example_password", "role": "normal", "settings": { "acl": [ { "id": "acl128aaaa99239", "permission": "produceconsume", "topic": "customer-events" }, { "id": "acl293098flskdf", "permission": "produce", "topic": "customer-events.*" }, { "id": "acl128ajei20123", "permission": "consume", "topic": "customer-events" } ] } } } ``` ```json { "user": { "name": "app-01", "password": "example_password", "role": "normal" } } ``` ```json { "user": { "name": "app-02", "password": "example_password", "role": "normal", "settings": { "pg_allow_replication": true } } } ``` ```json { "user": { "mysql_settings": { "auth_plugin": "mysql_native_password" }, "name": "app-02", "password": "example_password", "role": "normal" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Remove a Database User `/v2/databases/{database_cluster_uuid}/users/{username}` To remove a specific database user, send a DELETE request to `/v2/databases/$DATABASE_ID/users/$USERNAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. Note: User management is not supported for Caching or Valkey clusters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `username` string required Example: `app-01` The name of the database user. ##### Request: `/v2/databases/{database_cluster_uuid}/users/{username}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Databases.DeleteUser(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "app-01") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete_user(database_cluster_uuid="aba134a", username="backend_user1") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Reset a Database User's Password or Authentication Method `/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth` To reset the password for a database user, send a POST request to `/v2/databases/$DATABASE_ID/users/$USERNAME/reset_auth`. For `mysql` databases, the authentication method can be specifying by including a key in the JSON body called `mysql_settings` with the `auth_plugin` value specified. The response will be a JSON object with a `user` key. This will be set to an object containing the standard database user attributes. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `username` string required Example: `app-01` The name of the database user. #### Request Body: `application/json` `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. ##### Request: `/v2/databases/{database_cluster_uuid}/users/{username}/reset_auth` ### Payload Content type `application/json` ```json { "mysql_settings": { "auth_plugin": "caching_sha2_password" } } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"mysql_settings":{"auth_plugin": "caching_sha2_password"}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/users/app-01/reset_auth" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() resetUserAuthRequest := &godo.DatabaseResetUserAuthRequest{ MySQLSettings: &DatabaseMySQLUserSettings{ AuthPlugin: "caching_sha2_password", }, } user, _, err := client.Databases.ResetUserAuth(ctx, "88055188-9e54-4f21-ab11-8a918ed79ee2", "app-01", resetuserAuthRequest) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "mysql_settings": { "auth_plugin": "caching_sha2_password" } } get_resp = client.databases.reset_auth(database_cluster_uuid="a7a8bas", username="admin", body=req) ``` #### Responses **200** A JSON object with a key of user. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `user` object required **Show child properties** `access_cert` string optional read-only Access certificate for TLS client authentication. (Kafka only) `access_key` string optional read-only Access key for TLS client authentication. (Kafka only) `mysql_settings` object optional **Show child properties** `auth_plugin` string, one of: mysql_native_password, caching_sha2_password required Example: `mysql_native_password` A string specifying the authentication method to be used for connections to the MySQL user account. The valid values are `mysql_native_password` or `caching_sha2_password`. If excluded when creating a new user, the default for the version of MySQL in use will be used. As of MySQL 8.0, the default is `caching_sha2_password`. `name` string required Example: `app-01` The name of a database user. `password` string optional read-only Example: `example_password` A randomly generated password for the database user. Requires `database:view_credentials` scope. `role` string, one of: primary, normal optional read-only Example: `normal` A string representing the database user's role. The value will be either "primary" or "normal". `settings` object optional **Show child properties** `acl` array of object optional ACLs (Access Control Lists) specifying permissions on topics within a Kafka cluster. **Show child properties** `id` string optional Example: `aaa` An identifier for the ACL. Will be computed after the ACL is created/updated. `permission` string, one of: admin, consume, produce, produceconsume required Example: `consume` Permission set applied to the ACL. 'consume' allows for messages to be consumed from the topic. 'produce' allows for messages to be published to the topic. 'produceconsume' allows for both 'consume' and 'produce' permission. 'admin' allows for 'produceconsume' as well as any operations to administer the topic (delete, update). `topic` string required Example: `topic-abc.*` A regex for matching the topic(s) that this ACL should apply to. `mongo_user_settings` object optional MongoDB-specific settings for the user. Configure these when creating a user. Updating MongoDB roles or database access after creation is not supported; recreate the user to change them. This option is not currently supported for other database engines. **Show child properties** `databases` array of string optional Example: `["my-db","my-db-2"]` A list of databases to which the user should have access. When the database is set to `admin`, the user will have access to all databases based on the user's role i.e. a user with the role `readOnly` assigned to the `admin` database will have read access to all databases. `role` string, one of: readOnly, readWrite, dbAdmin optional Example: `readOnly` The role to assign to the user with each role mapping to a MongoDB built-in role. `readOnly` maps to a [read](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-read) role. `readWrite` maps to a [readWrite](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-readWrite) role. `dbAdmin` maps to a [dbAdmin](https://www.mongodb.com/docs/manual/reference/built-in-roles/#mongodb-authrole-dbAdmin) role. `opensearch_acl` array of object optional ACLs (Access Control Lists) specifying permissions on index within a OpenSearch cluster. **Show child properties** `index` string optional Example: `index-abc.*` A regex for matching the indexes that this ACL should apply to. `permission` string, one of: deny, admin, read, readwrite, write optional Example: `read` Permission set applied to the ACL. 'read' allows user to read from the index. 'write' allows for user to write to the index. 'readwrite' allows for both 'read' and 'write' permission. 'deny'(default) restricts user from performing any operation over an index. 'admin' allows for 'readwrite' as well as any operations to administer the index. `pg_allow_replication` boolean optional Example: `true` For PostgreSQL clusters, set to `true` to grant the user replication privileges. When omitted on create or update, the value defaults to `false` and replication privileges are not granted. This option is not currently supported for other database engines. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "user": { "access_cert": "-----BEGIN CERTIFICATE-----\nMIIEexampleCertificateNotForProductionUseOnly\n-----END CERTIFICATE-----", "access_key": "-----BEGIN PRIVATE KEY-----\nMIIEexamplePrivateKeyNotForProductionUseOnly\n-----END PRIVATE KEY-----", "name": "app-03", "password": "example_password", "role": "normal", "settings": { "acl": [ { "id": "acl128aaaa99239", "permission": "produceconsume", "topic": "customer-events" }, { "id": "acl293098flskdf", "permission": "produce", "topic": "customer-events.*" }, { "id": "acl128ajei20123", "permission": "consume", "topic": "customer-events" } ] } } } ``` ```json { "user": { "name": "app-01", "password": "example_password", "role": "normal" } } ``` ```json { "user": { "name": "app-02", "password": "example_password", "role": "normal", "settings": { "pg_allow_replication": true } } } ``` ```json { "user": { "mysql_settings": { "auth_plugin": "mysql_native_password" }, "name": "app-02", "password": "example_password", "role": "normal" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Databases `/v2/databases/{database_cluster_uuid}/dbs` To list all of the databases in a clusters, send a GET request to `/v2/databases/$DATABASE_ID/dbs`. The result will be a JSON object with a `dbs` key. This will be set to an array of database objects, each of which will contain the standard database attributes. Note: Database management is not supported for Caching or Valkey clusters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/dbs` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() dbs, _, err := client.Databases.ListDBs(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list(database_cluster_uuid="a7aba9d") ``` #### Responses **200** A JSON object with a key of databases. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `dbs` array of object optional **Show child properties** `name` string required Example: `alpha` The name of the database. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "dbs": [ { "name": "alpha" }, { "name": "defaultdb" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add a New Database `/v2/databases/{database_cluster_uuid}/dbs` To add a new database to an existing cluster, send a POST request to `/v2/databases/$DATABASE_ID/dbs`. Note: Database management is not supported for Caching or Valkey clusters. The response will be a JSON object with a key called `db`. The value of this will be an object that contains the standard attributes associated with a database. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `name` string required Example: `alpha` The name of the database. ##### Request: `/v2/databases/{database_cluster_uuid}/dbs` ### Payload Content type `application/json` ```json { "name": "alpha" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "alpha"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createDBReq := &godo.DatabaseCreateDBRequest{ Name: "alpha", } db, _, err := client.Databases.CreateDB(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", createDBReq) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) add_resp = client.databases.add(database_cluster_uuid="9cc10173", body={"name": "alpha"}) ``` #### Responses **201** A JSON object with a key of db. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `db` object required **Show child properties** `name` string required Example: `alpha` The name of the database. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "db": { "name": "alpha" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Database `/v2/databases/{database_cluster_uuid}/dbs/{database_name}` To show information about an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. Note: Database management is not supported for Caching or Valkey clusters. The response will be a JSON object with a `db` key. This will be set to an object containing the standard database attributes. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `database_name` string required Example: `alpha` The name of the database. ##### Request: `/v2/databases/{database_cluster_uuid}/dbs/{database_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() db, _, err := client.Databases.GetDB(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "alpha") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get(database_cluster_uuid="a9a8a77", database_name="admin") ``` #### Responses **200** A JSON object with a key of db. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `db` object required **Show child properties** `name` string required Example: `alpha` The name of the database. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "db": { "name": "alpha" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Database `/v2/databases/{database_cluster_uuid}/dbs/{database_name}` To delete a specific database, send a DELETE request to `/v2/databases/$DATABASE_ID/dbs/$DB_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. Note: Database management is not supported for Caching or Valkey clusters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `database_name` string required Example: `alpha` The name of the database. ##### Request: `/v2/databases/{database_cluster_uuid}/dbs/{database_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/dbs/alpha" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Databases.DeleteDB(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "alpha") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.databases.delete(database_cluster_uuid="a7abda", database_name="ba1341") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Connection Pools (PostgreSQL) `/v2/databases/{database_cluster_uuid}/pools` To list all of the connection pools available to a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools`. The result will be a JSON object with a `pools` key. This will be set to an array of connection pool objects. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/pools` ### cURL ```bash curl -X GET / -H "Content-Type: application/json" / -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" / "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() pools, _, err := client.Databases.ListPools(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.list_connection_pools(database_cluster_uuid="a7aab9a") ``` #### Responses **200** A JSON object with a key of pools. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pools` array of object optional read-only An array of connection pool objects. **Show child properties** `connection` object optional `db` string required Example: `defaultdb` The database for use with the connection pool. `mode` string required Example: `transaction` The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. `name` string required Example: `backend-pool` A unique name for the connection pool. Must be between 3 and 60 characters. `private_connection` object optional `size` integer (int32) required Example: `10` The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. `standby_connection` object optional `standby_private_connection` object optional `user` string optional Example: `doadmin` The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pools": [ { "connection": { "database": "foo", "host": "db.example.com", "password": "example_password", "port": 25061, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25061/foo?sslmode=require", "user": "doadmin" }, "db": "defaultdb", "mode": "session", "name": "reporting-pool", "size": 10, "user": "doadmin" }, { "connection": { "database": "backend-pool", "host": "db.example.com", "password": "example_password", "port": 25061, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25061/backend-pool?sslmode=require", "user": "doadmin" }, "db": "defaultdb", "mode": "transaction", "name": "backend-pool", "size": 10, "user": "doadmin" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add a New Connection Pool (PostgreSQL) `/v2/databases/{database_cluster_uuid}/pools` For PostgreSQL database clusters, connection pools can be used to allow a database to share its idle connections. The popular PostgreSQL connection pooling utility PgBouncer is used to provide this service. [See here for more information](https://docs.digitalocean.com/products/databases/postgresql/how-to/manage-connection-pools/index.html.md) about how and why to use PgBouncer connection pooling including details about the available transaction modes. To add a new connection pool to a PostgreSQL database cluster, send a POST request to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool, the user to connect with, the database to connect to, as well as its desired size and transaction mode. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `connection` object optional `db` string required Example: `defaultdb` The database for use with the connection pool. `mode` string required Example: `transaction` The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. `name` string required Example: `backend-pool` A unique name for the connection pool. Must be between 3 and 60 characters. `private_connection` object optional `size` integer (int32) required Example: `10` The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. `standby_connection` object optional `standby_private_connection` object optional `user` string optional Example: `doadmin` The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. ##### Request: `/v2/databases/{database_cluster_uuid}/pools` ### Payload Content type `application/json` ```json { "db": "defaultdb", "mode": "transaction", "name": "backend-pool", "size": 10, "user": "doadmin" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "backend-pool","mode": "transaction","size": 10,"db": "defaultdb","user": "doadmin"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() createPoolReq := &godo.DatabaseCreatePoolRequest{ Name: "backend-pool", Database: "defaultdb", Size: 10, User: "doadmin", Mode: "transaction", } pool, _, err := client.Databases.CreatePool(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", createPoolReq) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) add_conn_pool_req = { "name": "backend-pool", "mode": "transaction", "size": 10, "db": "defaultdb", "user": "doadmin" } add_conn_pool_resp = client.databases.add_connection_pool(database_cluster_uuid="9cc10173", body=add_conn_pool_req) ``` #### Responses **201** A JSON object with a key of pool. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pool` object required **Show child properties** `connection` object optional `db` string required Example: `defaultdb` The database for use with the connection pool. `mode` string required Example: `transaction` The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. `name` string required Example: `backend-pool` A unique name for the connection pool. Must be between 3 and 60 characters. `private_connection` object optional `size` integer (int32) required Example: `10` The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. `standby_connection` object optional `standby_private_connection` object optional `user` string optional Example: `doadmin` The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "pool": { "connection": { "database": "backend-pool", "host": "db.example.com", "password": "example_password", "port": 25061, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25061/backend-pool?sslmode=require", "user": "doadmin" }, "db": "defaultdb", "mode": "transaction", "name": "backend-pool", "size": 10, "user": "doadmin" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Existing Connection Pool (PostgreSQL) `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` To show information about an existing connection pool for a PostgreSQL database cluster, send a GET request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. The response will be a JSON object with a `pool` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `pool_name` string required Example: `backend-pool` The name used to identify the connection pool. ##### Request: `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` ### cURL ```bash curl -X GET / -H "Content-Type: application/json" / -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" / "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() pool, _, err := client.Databases.GetPool(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "backend-pool") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_connection_pool(database_cluster_uuid="a7aba8a", pool_name="backend-pool") ``` #### Responses **200** A JSON object with a key of pool. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `pool` object required **Show child properties** `connection` object optional `db` string required Example: `defaultdb` The database for use with the connection pool. `mode` string required Example: `transaction` The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. `name` string required Example: `backend-pool` A unique name for the connection pool. Must be between 3 and 60 characters. `private_connection` object optional `size` integer (int32) required Example: `10` The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. `standby_connection` object optional `standby_private_connection` object optional `user` string optional Example: `doadmin` The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "pool": { "connection": { "database": "backend-pool", "host": "db.example.com", "password": "example_password", "port": 25061, "ssl": true, "uri": "postgres://doadmin:example_password@db.example.com:25061/backend-pool?sslmode=require", "user": "doadmin" }, "db": "defaultdb", "mode": "transaction", "name": "backend-pool", "size": 10, "user": "doadmin" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Connection Pools (PostgreSQL) `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` To update a connection pool for a PostgreSQL database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `pool_name` string required Example: `backend-pool` The name used to identify the connection pool. #### Request Body: `application/json` `db` string required Example: `defaultdb` The database for use with the connection pool. `mode` string required Example: `transaction` The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement. `size` integer (int32) required Example: `10` The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster. `user` string optional Example: `doadmin` The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user. ##### Request: `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` ### Payload Content type `application/json` ```json { "db": "defaultdb", "mode": "transaction", "size": 10, "user": "doadmin" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"mode": "transaction", "size": 15, "db": "defaultdb", "user": "doadmin"}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() updateReq := &godo.DatabaseUpdatePoolRequest{ User: "doadmin", Size: 15, Database: "defaultdb", Mode: "transaction", } _, err := client.Databases.UpdatePool(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "backend-pool", updateReq) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "mode": "transaction", "size": 10, "db": "defaultdb", "user": "doadmin" } update_resp = client.databases.update_connection_pool(database_cluster_uuid="a7a8bas", pool_name="conn_pool", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Connection Pool (PostgreSQL) `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` To delete a specific connection pool for a PostgreSQL database cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/pools/$POOL_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `pool_name` string required Example: `backend-pool` The name used to identify the connection pool. ##### Request: `/v2/databases/{database_cluster_uuid}/pools/{pool_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/pools/backend-pool" ``` ### Go ```go import ( "context" "github.com/digitalocean/godo" ) func main() { pat := "mytoken" client := godo.NewFromToken(pat) ctx := context.TODO() _, err := client.Databases.DeletePool(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "backend-pool") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_conn_pool = client.databases.delete_connection_pool(database_cluster_uuid="9cc10173", pool_name="backend-pool") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve the Eviction Policy for a Caching or Valkey Cluster `/v2/databases/{database_cluster_uuid}/eviction_policy` To retrieve the configured eviction policy for an existing Caching or Valkey cluster, send a GET request to `/v2/databases/$DATABASE_ID/eviction_policy`. The response will be a JSON object with an `eviction_policy` key. This will be set to a string representing the eviction policy. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/eviction_policy` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() db, _, err := client.Databases.GetEvictionPolicy(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_eviction_policy(database_cluster_uuid="a7aa89a") ``` #### Responses **200** A JSON string with a key of eviction_policy. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `eviction_policy` string (enum) required Example: `allkeys_lru` A string specifying the desired eviction policy for a Caching or Valkey cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys_lru:` Evict any key, least recently used (LRU) first. - `allkeys_random`: Evict keys in a random order. - `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile_random`: Evict keys with expiration only in a random order. - `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "eviction_policy": "allkeys_lru" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Configure the Eviction Policy for a Caching or Valkey Cluster `/v2/databases/{database_cluster_uuid}/eviction_policy` To configure an eviction policy for an existing Caching or Valkey cluster, send a PUT request to `/v2/databases/$DATABASE_ID/eviction_policy` specifying the desired policy. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `eviction_policy` string (enum) required Example: `allkeys_lru` A string specifying the desired eviction policy for a Caching or Valkey cluster. - `noeviction`: Don't evict any data, returns error when memory limit is reached. - `allkeys_lru:` Evict any key, least recently used (LRU) first. - `allkeys_random`: Evict keys in a random order. - `volatile_lru`: Evict keys with expiration only, least recently used (LRU) first. - `volatile_random`: Evict keys with expiration only in a random order. - `volatile_ttl`: Evict keys with expiration only, shortest time-to-live (TTL) first. ##### Request: `/v2/databases/{database_cluster_uuid}/eviction_policy` ### Payload Content type `application/json` ```json { "eviction_policy": "allkeys_lru" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"eviction_policy":"allkeys_lru"}' \ "https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/eviction_policy" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() db, _, err := client.Databases.SetEvictionPolicy(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", "allkeys_lru") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "eviction_policy": "allkeys_lru" } update_resp = client.databases.update_eviction_policy(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve the SQL Modes for a MySQL Cluster `/v2/databases/{database_cluster_uuid}/sql_mode` To retrieve the configured SQL modes for an existing MySQL cluster, send a GET request to `/v2/databases/$DATABASE_ID/sql_mode`. The response will be a JSON object with a `sql_mode` key. This will be set to a string representing the configured SQL modes. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/sql_mode` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() sqlMode, _, err := client.Databases.GetSQLMode(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30") } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_sql_mode(database_cluster_uuid="90abaa8") ``` #### Responses **200** A JSON string with a key of sql_mode. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sql_mode` string required A string specifying the configured SQL modes for the MySQL cluster. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update SQL Mode for a Cluster `/v2/databases/{database_cluster_uuid}/sql_mode` To configure the SQL modes for an existing MySQL cluster, send a PUT request to `/v2/databases/$DATABASE_ID/sql_mode` specifying the desired modes. See the official MySQL 8 documentation for a [full list of supported SQL modes](https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sql-mode-full). A successful request will receive a 204 No Content status code with no body in response. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `sql_mode` string required A string specifying the configured SQL modes for the MySQL cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/sql_mode` ### Payload Content type `application/json` ```json { "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"sql_mode":"ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE"}' \ "https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/sql_mode" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() sqlMode := "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE" _, err := client.Databases.SetSQLMode(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", sqlMode) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE" } update_resp = client.databases.update_sql_mode(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Upgrade Major Version for a Database `/v2/databases/{database_cluster_uuid}/upgrade` To upgrade the major version of a database, send a PUT request to `/v2/databases/$DATABASE_ID/upgrade`, specifying the target version. A successful request will receive a 204 No Content status code with no body in response. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `version` string optional Example: `8` A string representing the version of the database engine in use for the cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/upgrade` ### Payload Content type `application/json` ```json { "version": "14" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"version":"14"}' \ "https://api.digitalocean.com/v2/databases/9cdb64e5-61e4-4b30-b711-11ef66d84558/upgrade" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "version": "14" } update_resp = client.databases.update_major_version(database_cluster_uuid="a7a8bas", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Autoscale Configuration for a Database Cluster `/v2/databases/{database_cluster_uuid}/autoscale` To retrieve the autoscale configuration for an existing database cluster, send a GET request to `/v2/databases/$DATABASE_ID/autoscale`. The response will be a JSON object with autoscaling configuration details. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/autoscale` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/autoscale" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.databases.get_autoscale(database_cluster_uuid="a7a89a") ``` #### Responses **200** A JSON object with autoscale configuration details. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `autoscale` object optional Contains all autoscaling configuration for a database cluster **Show child properties** `storage` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "autoscale": { "storage": { "enabled": true, "increment_gib": 10, "threshold_percent": 80 } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Configure Autoscale Settings for a Database Cluster `/v2/databases/{database_cluster_uuid}/autoscale` To configure autoscale settings for an existing database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/autoscale`, specifying the autoscale configuration. A successful request will receive a 204 No Content status code with no body in response. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `storage` object optional ##### Request: `/v2/databases/{database_cluster_uuid}/autoscale` ### Payload Content type `application/json` ```json { "storage": { "enabled": true, "increment_gib": 10, "threshold_percent": 80 } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"storage":{"enabled":true,"threshold_percent":80,"increment_gib":10}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/autoscale" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "storage": { "enabled": True, "threshold_percent": 80, "increment_gib": 10 } } update_resp = client.databases.update_autoscale(database_cluster_uuid="a7a89a", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Unprocessable Entity Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **422** ```json { "id": "unprocessable_entity", "message": "request payload validation failed", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Topics for a Kafka Cluster `/v2/databases/{database_cluster_uuid}/topics` To list all of a Kafka cluster's topics, send a GET request to `/v2/databases/$DATABASE_ID/topics`. The result will be a JSON object with a `topics` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/topics` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replicas, _, err := client.Databases.ListTopics(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` #### Responses **200** A JSON object with a key of topics. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `topics` array of object optional **Show child properties** `name` string optional Example: `events` The name of the Kafka topic. `partition_count` integer optional Example: `3` The number of partitions available for the topic. On update, this value can only be increased. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. `state` string, one of: active, configuring, deleting, unknown optional Example: `active` The state of the Kafka topic. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "topics": [ { "name": "customer-events", "partition_count": 3, "replication_factor": 2, "state": "active" }, { "name": "engineering-events", "partition_count": 10, "replication_factor": 2, "state": "configuring" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Topic for a Kafka Cluster `/v2/databases/{database_cluster_uuid}/topics` To create a topic attached to a Kafka cluster, send a POST request to `/v2/databases/$DATABASE_ID/topics`. The result will be a JSON object with a `topic` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `name` string optional Example: `events` The name of the Kafka topic. `partition_count` integer optional Example: `3` The number of partitions available for the topic. On update, this value can only be increased. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. `config` object optional **Show child properties** `cleanup_policy` string, one of: delete, compact, compact_delete optional Example: `delete` The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. `compression_type` string (enum) optional Example: `producer` The compression_type specifies the compression type of the topic. `delete_retention_ms` integer optional Example: `86400000` The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. `file_delete_delay_ms` integer optional Example: `60000` The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. `flush_messages` integer optional Example: `9223372036854776000` The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. `flush_ms` integer optional Example: `9223372036854776000` The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. `index_interval_bytes` integer optional Example: `4096` The index_interval_bytes specifies the number of bytes between entries being added into te offset index. `max_compaction_lag_ms` integer optional Example: `9223372036854776000` The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. `max_message_bytes` integer optional Example: `1048588` The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. `message_down_conversion_enable` boolean optional Example: `true` The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. `message_format_version` string (enum) optional Example: `3.0-IV1` The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. `message_timestamp_type` string, one of: create_time, log_append_time optional Example: `create_time` The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. `min_cleanable_dirty_ratio` number (float) optional Example: `0.5` The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. `min_compaction_lag_ms` integer optional Example: `0` The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. `min_insync_replicas` integer optional Example: `1` The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. `preallocate` boolean optional Example: `false` The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. `retention_bytes` integer optional Example: `1000000` The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. `retention_ms` integer optional Example: `604800000` The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. `segment_bytes` integer optional Example: `209715200` The segment_bytes specifies the maximum size of a single log file (in bytes). `segment_jitter_ms` integer optional Example: `0` The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. `segment_ms` integer optional Example: `604800000` The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. ##### Request: `/v2/databases/{database_cluster_uuid}/topics` ### Payload Content type `application/json` ```json { "config": { "retention_bytes": -1, "retention_ms": 100000 }, "name": "customer-events", "partitions": 3, "replication": 2 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"customer-events", "partition_count":3, "replication_factor": 3, "config": {"retentionMS": 1000000}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &DatabaseCreateTopicRequest{ Name: "events", PartitionCount: 3, ReplicationFactor: 2, Config: &TopicConfig{ RetentionMS: 60000, } }, cluster, _, err := client.Databases.CreateTopic(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", createRequest) } ``` #### Responses **201** A JSON object with a key of topic. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `topic` object optional **Show child properties** `config` object optional **Show child properties** `cleanup_policy` string, one of: delete, compact, compact_delete optional Example: `delete` The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. `compression_type` string (enum) optional Example: `producer` The compression_type specifies the compression type of the topic. `delete_retention_ms` integer optional Example: `86400000` The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. `file_delete_delay_ms` integer optional Example: `60000` The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. `flush_messages` integer optional Example: `9223372036854776000` The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. `flush_ms` integer optional Example: `9223372036854776000` The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. `index_interval_bytes` integer optional Example: `4096` The index_interval_bytes specifies the number of bytes between entries being added into te offset index. `max_compaction_lag_ms` integer optional Example: `9223372036854776000` The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. `max_message_bytes` integer optional Example: `1048588` The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. `message_down_conversion_enable` boolean optional Example: `true` The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. `message_format_version` string (enum) optional Example: `3.0-IV1` The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. `message_timestamp_type` string, one of: create_time, log_append_time optional Example: `create_time` The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. `min_cleanable_dirty_ratio` number (float) optional Example: `0.5` The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. `min_compaction_lag_ms` integer optional Example: `0` The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. `min_insync_replicas` integer optional Example: `1` The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. `preallocate` boolean optional Example: `false` The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. `retention_bytes` integer optional Example: `1000000` The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. `retention_ms` integer optional Example: `604800000` The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. `segment_bytes` integer optional Example: `209715200` The segment_bytes specifies the maximum size of a single log file (in bytes). `segment_jitter_ms` integer optional Example: `0` The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. `segment_ms` integer optional Example: `604800000` The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. `name` string optional Example: `events` The name of the Kafka topic. `partitions` array of object optional **Show child properties** `consumer_groups` array of object optional Nullable **Show child properties** `group_name` string optional Example: `consumer` Name of the consumer group. `offset` integer optional Example: `0` The current offset of the consumer group. `earliest_offset` integer optional Example: `0` The earliest consumer offset amongst consumer groups. `id` integer optional Example: `1` An identifier for the partition. `in_sync_replicas` integer optional Example: `3` The number of nodes that are in-sync (have the latest data) for the given partition `size` integer optional Example: `4096` Size of the topic partition in bytes. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. `state` string, one of: active, configuring, deleting, unknown optional Example: `active` The state of the Kafka topic. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "topic": { "config": { "cleanup_policy": "delete", "compression_type": "producer", "delete_retention_ms": 86400000, "file_delete_delay_ms": 60000, "flush_messages": "9223372036854776000", "flush_ms": "9223372036854776000", "index_interval_bytes": 4096, "max_compaction_lag_ms": "9223372036854776000", "max_message_bytes": 1048588, "message_down_conversion_enable": true, "message_format_version": "3.0-IV1", "message_timestamp_difference_max_ms": "9223372036854776000", "message_timestamp_type": "create_time", "min_cleanable_dirty_ratio": 0.5, "min_compaction_lag_ms": 0, "min_insync_replicas": 1, "preallocate": false, "retention_bytes": -1, "retention_ms": 604800000, "segment_bytes": 209715200, "segment_index_bytes": 10485760, "segment_jitter_ms": 0, "segment_ms": 604800000 }, "name": "customer-events", "partitions": [ { "consumer_groups": [ { "name": "consumer-group-1", "offset": 0 }, { "name": "consumer-group-2", "offset": 1 } ], "earliest_offset": 0, "id": 0, "in_sync_replicas": 3, "size": 4096 }, { "consumer_groups": null, "earliest_offset": 0, "id": 1, "in_sync_replicas": 3, "size": 4096 } ], "replication_factor": 3, "state": "active" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Topic for a Kafka Cluster `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` To retrieve a given topic by name from the set of a Kafka cluster's topics, send a GET request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. The result will be a JSON object with a `topic` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `topic_name` string required Example: `customer-events` The name used to identify the Kafka topic. ##### Request: `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() topicName := "events" user, _, err := client.Databases.GetTopic(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", topicName) } ``` #### Responses **200** A JSON object with a key of topic. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `topic` object optional **Show child properties** `config` object optional **Show child properties** `cleanup_policy` string, one of: delete, compact, compact_delete optional Example: `delete` The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. `compression_type` string (enum) optional Example: `producer` The compression_type specifies the compression type of the topic. `delete_retention_ms` integer optional Example: `86400000` The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. `file_delete_delay_ms` integer optional Example: `60000` The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. `flush_messages` integer optional Example: `9223372036854776000` The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. `flush_ms` integer optional Example: `9223372036854776000` The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. `index_interval_bytes` integer optional Example: `4096` The index_interval_bytes specifies the number of bytes between entries being added into te offset index. `max_compaction_lag_ms` integer optional Example: `9223372036854776000` The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. `max_message_bytes` integer optional Example: `1048588` The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. `message_down_conversion_enable` boolean optional Example: `true` The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. `message_format_version` string (enum) optional Example: `3.0-IV1` The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. `message_timestamp_type` string, one of: create_time, log_append_time optional Example: `create_time` The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. `min_cleanable_dirty_ratio` number (float) optional Example: `0.5` The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. `min_compaction_lag_ms` integer optional Example: `0` The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. `min_insync_replicas` integer optional Example: `1` The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. `preallocate` boolean optional Example: `false` The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. `retention_bytes` integer optional Example: `1000000` The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. `retention_ms` integer optional Example: `604800000` The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. `segment_bytes` integer optional Example: `209715200` The segment_bytes specifies the maximum size of a single log file (in bytes). `segment_jitter_ms` integer optional Example: `0` The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. `segment_ms` integer optional Example: `604800000` The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. `name` string optional Example: `events` The name of the Kafka topic. `partitions` array of object optional **Show child properties** `consumer_groups` array of object optional Nullable **Show child properties** `group_name` string optional Example: `consumer` Name of the consumer group. `offset` integer optional Example: `0` The current offset of the consumer group. `earliest_offset` integer optional Example: `0` The earliest consumer offset amongst consumer groups. `id` integer optional Example: `1` An identifier for the partition. `in_sync_replicas` integer optional Example: `3` The number of nodes that are in-sync (have the latest data) for the given partition `size` integer optional Example: `4096` Size of the topic partition in bytes. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. `state` string, one of: active, configuring, deleting, unknown optional Example: `active` The state of the Kafka topic. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "topic": { "config": { "cleanup_policy": "delete", "compression_type": "producer", "delete_retention_ms": 86400000, "file_delete_delay_ms": 60000, "flush_messages": "9223372036854776000", "flush_ms": "9223372036854776000", "index_interval_bytes": 4096, "max_compaction_lag_ms": "9223372036854776000", "max_message_bytes": 1048588, "message_down_conversion_enable": true, "message_format_version": "3.0-IV1", "message_timestamp_difference_max_ms": "9223372036854776000", "message_timestamp_type": "create_time", "min_cleanable_dirty_ratio": 0.5, "min_compaction_lag_ms": 0, "min_insync_replicas": 1, "preallocate": false, "retention_bytes": -1, "retention_ms": 604800000, "segment_bytes": 209715200, "segment_index_bytes": 10485760, "segment_jitter_ms": 0, "segment_ms": 604800000 }, "name": "customer-events", "partitions": [ { "consumer_groups": [ { "name": "consumer-group-1", "offset": 0 }, { "name": "consumer-group-2", "offset": 1 } ], "earliest_offset": 0, "id": 0, "in_sync_replicas": 3, "size": 4096 }, { "consumer_groups": null, "earliest_offset": 0, "id": 1, "in_sync_replicas": 3, "size": 4096 } ], "replication_factor": 3, "state": "active" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Topic for a Kafka Cluster `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` To update a topic attached to a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. The result will be a JSON object with a `topic` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `topic_name` string required Example: `customer-events` The name used to identify the Kafka topic. #### Request Body: `application/json` `config` object optional **Show child properties** `cleanup_policy` string, one of: delete, compact, compact_delete optional Example: `delete` The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. `compression_type` string (enum) optional Example: `producer` The compression_type specifies the compression type of the topic. `delete_retention_ms` integer optional Example: `86400000` The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. `file_delete_delay_ms` integer optional Example: `60000` The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. `flush_messages` integer optional Example: `9223372036854776000` The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. `flush_ms` integer optional Example: `9223372036854776000` The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. `index_interval_bytes` integer optional Example: `4096` The index_interval_bytes specifies the number of bytes between entries being added into te offset index. `max_compaction_lag_ms` integer optional Example: `9223372036854776000` The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. `max_message_bytes` integer optional Example: `1048588` The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. `message_down_conversion_enable` boolean optional Example: `true` The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. `message_format_version` string (enum) optional Example: `3.0-IV1` The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. `message_timestamp_type` string, one of: create_time, log_append_time optional Example: `create_time` The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. `min_cleanable_dirty_ratio` number (float) optional Example: `0.5` The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. `min_compaction_lag_ms` integer optional Example: `0` The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. `min_insync_replicas` integer optional Example: `1` The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. `preallocate` boolean optional Example: `false` The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. `retention_bytes` integer optional Example: `1000000` The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. `retention_ms` integer optional Example: `604800000` The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. `segment_bytes` integer optional Example: `209715200` The segment_bytes specifies the maximum size of a single log file (in bytes). `segment_jitter_ms` integer optional Example: `0` The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. `segment_ms` integer optional Example: `604800000` The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. `partition_count` integer optional Example: `3` The number of partitions available for the topic. On update, this value can only be increased. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` ### Payload Content type `application/json` ```json { "config": { "retention_bytes": -1, "retention_ms": 100000 }, "partitions": 3, "replication": 2 } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"partition_count":3, "replication_factor": 3, "config": {"retentionMS": 1000000}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() topicName := "events" updateRequest := &DatabaseUpdateTopicRequest{ PartitionCount: 3, ReplicationFactor: 2, Config: &TopicConfig{ RetentionMS: 60000, }, } _, err := client.Databases.UpdateTopic(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", topicName, updateRequest) } ``` #### Responses **200** A JSON object with a key of topic. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `topic` object optional **Show child properties** `config` object optional **Show child properties** `cleanup_policy` string, one of: delete, compact, compact_delete optional Example: `delete` The cleanup_policy sets the retention policy to use on log segments. 'delete' will discard old segments when retention time/size limits are reached. 'compact' will enable log compaction, resulting in retention of the latest value for each key. `compression_type` string (enum) optional Example: `producer` The compression_type specifies the compression type of the topic. `delete_retention_ms` integer optional Example: `86400000` The delete_retention_ms specifies how long (in ms) to retain delete tombstone markers for topics. `file_delete_delay_ms` integer optional Example: `60000` The file_delete_delay_ms specifies the time (in ms) to wait before deleting a file from the filesystem. `flush_messages` integer optional Example: `9223372036854776000` The flush_messages specifies the number of messages to accumulate on a log partition before messages are flushed to disk. `flush_ms` integer optional Example: `9223372036854776000` The flush_ms specifies the maximum time (in ms) that a message is kept in memory before being flushed to disk. `index_interval_bytes` integer optional Example: `4096` The index_interval_bytes specifies the number of bytes between entries being added into te offset index. `max_compaction_lag_ms` integer optional Example: `9223372036854776000` The max_compaction_lag_ms specifies the maximum amount of time (in ms) that a message will remain uncompacted. This is only applicable if the logs are have compaction enabled. `max_message_bytes` integer optional Example: `1048588` The max_messages_bytes specifies the largest record batch size (in bytes) that can be sent to the server. This is calculated after compression if compression is enabled. `message_down_conversion_enable` boolean optional Example: `true` The message_down_conversion_enable specifies whether down-conversion of message formats is enabled to satisfy consumer requests. When 'false', the broker will not perform conversion for consumers expecting older message formats. The broker will respond with an `UNSUPPORTED_VERSION` error for consume requests from these older clients. `message_format_version` string (enum) optional Example: `3.0-IV1` The message_format_version specifies the message format version used by the broker to append messages to the logs. The value of this setting is assumed to be 3.0-IV1 if the broker protocol version is 3.0 or higher. By setting a particular message format version, all existing messages on disk must be smaller or equal to the specified version. `message_timestamp_type` string, one of: create_time, log_append_time optional Example: `create_time` The message_timestamp_type specifies whether to use the message create time or log append time as the timestamp on a message. `min_cleanable_dirty_ratio` number (float) optional Example: `0.5` The min_cleanable_dirty_ratio specifies the frequency of log compaction (if enabled) in relation to duplicates present in the logs. For example, at 0.5, at most 50% of the log could be duplicates before compaction would begin. `min_compaction_lag_ms` integer optional Example: `0` The min_compaction_lag_ms specifies the minimum time (in ms) that a message will remain uncompacted in the log. Only relevant if log compaction is enabled. `min_insync_replicas` integer optional Example: `1` The min_insync_replicas specifies the number of replicas that must ACK a write for the write to be considered successful. `preallocate` boolean optional Example: `false` The preallocate specifies whether a file should be preallocated on disk when creating a new log segment. `retention_bytes` integer optional Example: `1000000` The retention_bytes specifies the maximum size of the log (in bytes) before deleting messages. -1 indicates that there is no limit. `retention_ms` integer optional Example: `604800000` The retention_ms specifies the maximum amount of time (in ms) to keep a message before deleting it. `segment_bytes` integer optional Example: `209715200` The segment_bytes specifies the maximum size of a single log file (in bytes). `segment_jitter_ms` integer optional Example: `0` The segment_jitter_ms specifies the maximum random jitter subtracted from the scheduled segment roll time to avoid thundering herds of segment rolling. `segment_ms` integer optional Example: `604800000` The segment_ms specifies the period of time after which the log will be forced to roll if the segment file isn't full. This ensures that retention can delete or compact old data. `name` string optional Example: `events` The name of the Kafka topic. `partitions` array of object optional **Show child properties** `consumer_groups` array of object optional Nullable **Show child properties** `group_name` string optional Example: `consumer` Name of the consumer group. `offset` integer optional Example: `0` The current offset of the consumer group. `earliest_offset` integer optional Example: `0` The earliest consumer offset amongst consumer groups. `id` integer optional Example: `1` An identifier for the partition. `in_sync_replicas` integer optional Example: `3` The number of nodes that are in-sync (have the latest data) for the given partition `size` integer optional Example: `4096` Size of the topic partition in bytes. `replication_factor` integer optional Example: `2` The number of nodes to replicate data across the cluster. `state` string, one of: active, configuring, deleting, unknown optional Example: `active` The state of the Kafka topic. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "topic": { "config": { "cleanup_policy": "delete", "compression_type": "producer", "delete_retention_ms": 86400000, "file_delete_delay_ms": 60000, "flush_messages": "9223372036854776000", "flush_ms": "9223372036854776000", "index_interval_bytes": 4096, "max_compaction_lag_ms": "9223372036854776000", "max_message_bytes": 1048588, "message_down_conversion_enable": true, "message_format_version": "3.0-IV1", "message_timestamp_difference_max_ms": "9223372036854776000", "message_timestamp_type": "create_time", "min_cleanable_dirty_ratio": 0.5, "min_compaction_lag_ms": 0, "min_insync_replicas": 1, "preallocate": false, "retention_bytes": -1, "retention_ms": 604800000, "segment_bytes": 209715200, "segment_index_bytes": 10485760, "segment_jitter_ms": 0, "segment_ms": 604800000 }, "name": "customer-events", "partitions": [ { "consumer_groups": [ { "name": "consumer-group-1", "offset": 0 }, { "name": "consumer-group-2", "offset": 1 } ], "earliest_offset": 0, "id": 0, "in_sync_replicas": 3, "size": 4096 }, { "consumer_groups": null, "earliest_offset": 0, "id": 1, "in_sync_replicas": 3, "size": 4096 } ], "replication_factor": 3, "state": "active" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Topic for a Kafka Cluster `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` To delete a single topic within a Kafka cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/topics/$TOPIC_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `topic_name` string required Example: `customer-events` The name used to identify the Kafka topic. ##### Request: `/v2/databases/{database_cluster_uuid}/topics/{topic_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/topics/customer-events" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() topicName := "events" _, err := client.Databases.DeleteTopic(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", topicName) } ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Logsinks for a Database Cluster `/v2/databases/{database_cluster_uuid}/logsink` To list logsinks for a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/logsink`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/logsink` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink" ``` #### Responses **200** A JSON object with a key of sinks. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sinks` array of object optional **Show child properties** `sink_id` string optional Example: `dfcc9f57d86bf58e321c2c6c31c7a971be244ac7` A unique identifier for Logsink `sink_name` string optional Example: `prod-logsink` The name of the Logsink `sink_type` string, one of: rsyslog, elasticsearch, opensearch optional Example: `rsyslog` `config` anyOf optional Example: `{"config":{"format":"rfc5424","port":514,"server":"192.168.0.1","tls":false}}` One of: **Rsyslog Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `cert` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` (PEM format) client cert to use `format` string, one of: rfc5424, rfc3164, custom required Example: `rfc5424` Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom `key` string optional Example: `-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n` (PEM format) client key if the server requires client authentication `logline` string optional Example: `<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%` Conditional (required if `format` == `custom`). Syslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`. * * * **Datadog Integration Example for Non-Mongo clusters**: ``` DD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg% ``` - Replace `DD_KEY` with your actual Datadog API key. - Replace `DB_NAME` with the actual name of your database cluster. - Configure the Server: - US Region: Use `intake.logs.datadoghq.com` - EU Region: Use `tcp-intake.logs.datadoghq.eu` - Configure the Port: - US Region: Use port `10516` - EU Region: Use port `443` - Enable TLS: - Ensure the TLS checkbox is enabled. - Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead. `port` integer required Example: `514` The internal port on which the rsyslog server is listening `sd` string optional Example: `TOKEN tag="LiteralValue"` content of the structured data block of rfc5424 message `server` string required Example: `192.168.0.1` DNS name or IPv4 address of the rsyslog server `tls` boolean required Example: `false` Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it) **Elasticsearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `elastic-logs` Elasticsearch index prefix `timeout` number (float) optional Example: `10` Elasticsearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Elasticsearch connection URL **Opensearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `opensearch-logs` Opensearch index prefix `timeout` number (float) optional Example: `10` Opensearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Opensearch connection URL **Datadog Logsink** `datadog_api_key` string required Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Datadog API key `site` string required Example: `http-intake.logs.datadoghq.com` Datadog connection URL **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "sinks": [ { "config": { "format": "rfc5424", "port": 514, "server": "192.168.0.1", "tls": false }, "sink_id": "799990b6-d551-454b-9ffe-b8618e9d6272", "sink_name": "logs-sink-1", "sink_type": "rsyslog" }, { "config": { "format": "rfc3164", "port": 514, "server": "192.168.10.1", "tls": false }, "sink_id": "d6e95157-5f58-48d0-9023-8cfb409d102a", "sink_name": "logs-sink-2", "sink_type": "rsyslog" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Logsink for a Database Cluster `/v2/databases/{database_cluster_uuid}/logsink` To create logsink for a database cluster, send a POST request to `/v2/databases/$DATABASE_ID/logsink`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `sink_name` string optional Example: `prod-logsink` The name of the Logsink `sink_type` string, one of: rsyslog, elasticsearch, opensearch, datadog optional Example: `rsyslog` Type of logsink integration. - Use `datadog` for Datadog integration **only with MongoDB clusters**. - For non-MongoDB clusters, use `rsyslog` for general syslog forwarding. - Other supported types include `elasticsearch` and `opensearch`. More details about the configuration can be found in the `config` property. `config` anyOf optional One of: **Rsyslog Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `cert` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` (PEM format) client cert to use `format` string, one of: rfc5424, rfc3164, custom required Example: `rfc5424` Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom `key` string optional Example: `-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n` (PEM format) client key if the server requires client authentication `logline` string optional Example: `<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%` Conditional (required if `format` == `custom`). Syslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`. * * * **Datadog Integration Example for Non-Mongo clusters**: ``` DD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg% ``` - Replace `DD_KEY` with your actual Datadog API key. - Replace `DB_NAME` with the actual name of your database cluster. - Configure the Server: - US Region: Use `intake.logs.datadoghq.com` - EU Region: Use `tcp-intake.logs.datadoghq.eu` - Configure the Port: - US Region: Use port `10516` - EU Region: Use port `443` - Enable TLS: - Ensure the TLS checkbox is enabled. - Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead. `port` integer required Example: `514` The internal port on which the rsyslog server is listening `sd` string optional Example: `TOKEN tag="LiteralValue"` content of the structured data block of rfc5424 message `server` string required Example: `192.168.0.1` DNS name or IPv4 address of the rsyslog server `tls` boolean required Example: `false` Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it) **Elasticsearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `elastic-logs` Elasticsearch index prefix `timeout` number (float) optional Example: `10` Elasticsearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Elasticsearch connection URL **Opensearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `opensearch-logs` Opensearch index prefix `timeout` number (float) optional Example: `10` Opensearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Opensearch connection URL **Datadog Logsink** `datadog_api_key` string required Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Datadog API key `site` string required Example: `http-intake.logs.datadoghq.com` Datadog connection URL ##### Request: `/v2/databases/{database_cluster_uuid}/logsink` ### Payload Content type `application/json` Example ```json { "config": { "datadog_api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "site": "http-intake.logs.datadoghq.com" }, "sink_name": "logs-sink", "sink_type": "datadog" } ``` ```json { "config": { "format": "rfc5424", "port": 514, "server": "192.168.0.1", "tls": false }, "sink_name": "logs-sink", "sink_type": "rsyslog" } ``` ```json { "config": { "index_days_max": 5, "index_prefix": "elasticsearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_name": "logs-sink", "sink_type": "elasticsearch" } ``` ```json { "config": { "index_days_max": 5, "index_prefix": "opensearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_name": "logs-sink", "sink_type": "opensearch" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"sink_name": "logsink", "sink_type": "rsyslog", "config": {"server": "192.168.10.1", "port": 514, "tls": false, "format": "rfc5424"}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink" ``` #### Responses **201** A JSON object with a key of sink. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sink` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** Example ```json { "sink": { "config": { "datadog_api_key": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "site": "http-intake.logs.datadoghq.com" }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "rsyslog" } } ``` ```json { "sink": { "config": { "format": "rfc5424", "port": 514, "server": "192.168.0.1", "tls": false }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "rsyslog" } } ``` ```json { "sink": { "config": { "index_days_max": 5, "index_prefix": "elasticsearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "elasticsearch" } } ``` ```json { "sink": { "config": { "index_days_max": 5, "index_prefix": "opensearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "opensearch" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Logsink for a Database Cluster `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` To get a logsink for a database cluster, send a GET request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `logsink_id` string required Example: `50484ec3-19d6-4cd3-b56f-3b0381c289a6` A unique identifier for a logsink of a database cluster ##### Request: `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488" ``` #### Responses **200** A JSON object with logsink properties. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sink_id` string optional Example: `dfcc9f57d86bf58e321c2c6c31c7a971be244ac7` A unique identifier for Logsink `sink_name` string optional Example: `prod-logsink` The name of the Logsink `sink_type` string, one of: rsyslog, elasticsearch, opensearch optional Example: `rsyslog` `config` anyOf optional Example: `{"config":{"format":"rfc5424","port":514,"server":"192.168.0.1","tls":false}}` One of: **Rsyslog Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `cert` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` (PEM format) client cert to use `format` string, one of: rfc5424, rfc3164, custom required Example: `rfc5424` Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom `key` string optional Example: `-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n` (PEM format) client key if the server requires client authentication `logline` string optional Example: `<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%` Conditional (required if `format` == `custom`). Syslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`. * * * **Datadog Integration Example for Non-Mongo clusters**: ``` DD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg% ``` - Replace `DD_KEY` with your actual Datadog API key. - Replace `DB_NAME` with the actual name of your database cluster. - Configure the Server: - US Region: Use `intake.logs.datadoghq.com` - EU Region: Use `tcp-intake.logs.datadoghq.eu` - Configure the Port: - US Region: Use port `10516` - EU Region: Use port `443` - Enable TLS: - Ensure the TLS checkbox is enabled. - Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead. `port` integer required Example: `514` The internal port on which the rsyslog server is listening `sd` string optional Example: `TOKEN tag="LiteralValue"` content of the structured data block of rfc5424 message `server` string required Example: `192.168.0.1` DNS name or IPv4 address of the rsyslog server `tls` boolean required Example: `false` Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it) **Elasticsearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `elastic-logs` Elasticsearch index prefix `timeout` number (float) optional Example: `10` Elasticsearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Elasticsearch connection URL **Opensearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `opensearch-logs` Opensearch index prefix `timeout` number (float) optional Example: `10` Opensearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Opensearch connection URL **Datadog Logsink** `datadog_api_key` string required Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Datadog API key `site` string required Example: `http-intake.logs.datadoghq.com` Datadog connection URL **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "config": { "format": "rfc5424", "port": 514, "server": "192.168.0.1", "tls": false }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "rsyslog" } ``` ```json { "config": { "index_days_max": 5, "index_prefix": "elasticsearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "elasticsearch" } ``` ```json { "config": { "index_days_max": 5, "index_prefix": "opensearch-logs", "url": "https://user:passwd@192.168.0.1:25060" }, "sink_id": "dfcc9f57d86bf58e321c2c6c31c7a971be244ac7", "sink_name": "logs-sink", "sink_type": "opensearch" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Logsink for a Database Cluster `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` To update a logsink for a database cluster, send a PUT request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `logsink_id` string required Example: `50484ec3-19d6-4cd3-b56f-3b0381c289a6` A unique identifier for a logsink of a database cluster #### Request Body: `application/json` `config` anyOf required One of: **Rsyslog Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `cert` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` (PEM format) client cert to use `format` string, one of: rfc5424, rfc3164, custom required Example: `rfc5424` Message format used by the server, this can be either rfc3164 (the old BSD style message format), `rfc5424` (current syslog message format) or custom `key` string optional Example: `-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n` (PEM format) client key if the server requires client authentication `logline` string optional Example: `<%pri%>%timestamp:::date-rfc3339% %HOSTNAME% %app-name% %msg%` Conditional (required if `format` == `custom`). Syslog log line template for a custom format, supporting limited rsyslog style templating (using `%tag%`). Supported tags are: `HOSTNAME`, `app-name`, `msg`, `msgid`, `pri`, `procid`, `structured-data`, `timestamp` and `timestamp:::date-rfc3339`. * * * **Datadog Integration Example for Non-Mongo clusters**: ``` DD_KEY <%pri%>1 %timestamp:::date-rfc3339% %HOSTNAME%.DB_NAME %app-name% - - - %msg% ``` - Replace `DD_KEY` with your actual Datadog API key. - Replace `DB_NAME` with the actual name of your database cluster. - Configure the Server: - US Region: Use `intake.logs.datadoghq.com` - EU Region: Use `tcp-intake.logs.datadoghq.eu` - Configure the Port: - US Region: Use port `10516` - EU Region: Use port `443` - Enable TLS: - Ensure the TLS checkbox is enabled. - Note: This configuration applies to **non-Mongo clusters only**. For **Mongo clusters**, use the `datadog_logsink` integration instead. `port` integer required Example: `514` The internal port on which the rsyslog server is listening `sd` string optional Example: `TOKEN tag="LiteralValue"` content of the structured data block of rfc5424 message `server` string required Example: `192.168.0.1` DNS name or IPv4 address of the rsyslog server `tls` boolean required Example: `false` Use TLS (as the messages are not filtered and may contain sensitive information, it is highly recommended to set this to true if the remote server supports it) **Elasticsearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `elastic-logs` Elasticsearch index prefix `timeout` number (float) optional Example: `10` Elasticsearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Elasticsearch connection URL **Opensearch Logsink** `ca` string optional Example: `-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n` PEM encoded CA certificate `index_days_max` integer optional Example: `5` Maximum number of days of logs to keep `index_prefix` string required Example: `opensearch-logs` Opensearch index prefix `timeout` number (float) optional Example: `10` Opensearch request timeout limit `url` string required Example: `https://user:passwd@192.168.0.1:9200` Opensearch connection URL **Datadog Logsink** `datadog_api_key` string required Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` Datadog API key `site` string required Example: `http-intake.logs.datadoghq.com` Datadog connection URL ##### Request: `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` ### Payload Content type `application/json` ```json { "config": { "format": "rfc3164", "port": 514, "server": "192.168.0.1", "tls": false } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"config": {"server": "192.168.1.1", "port": 514, "tls": false, "format": "rfc3164"}}' \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488" ``` #### Responses **200** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Logsink for a Database Cluster `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` To delete a logsink for a database cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/logsink/$LOGSINK_ID`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `logsink_id` string required Example: `50484ec3-19d6-4cd3-b56f-3b0381c289a6` A unique identifier for a logsink of a database cluster ##### Request: `/v2/databases/{database_cluster_uuid}/logsink/{logsink_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/logsink/77b28fc8-19ff-11eb-8c9c-c68e24557488" ``` #### Responses **200** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Schemas for Kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry` To list all schemas for a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry" ``` #### Responses **200** A JSON object with a key of subjects. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `subjects` array of object optional **Show child properties** `schema` string optional The schema definition in the specified format. `schema_id` integer optional Example: `12345` The id for schema. `schema_type` string, one of: AVRO, JSON, PROTOBUF optional Example: `AVRO` The type of the schema. `subject_name` string optional Example: `customer-schema` The name of the schema subject. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "subjects": [ { "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [ \n {\"name\": \"id\", \"type\": \"int\"},\n {\"name\": \"name\", \"type\": \"string\"}\n ]\n} ", "schema_id": 12345, "schema_type": "AVRO", "subject_name": "customer-schema" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Schema Registry for Kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry` To create a Kafka schema for a database cluster, send a POST request to `/v2/databases/$DATABASE_ID/schema-registry`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `schema` string optional The schema definition in the specified format. `schema_type` string, one of: AVRO, JSON, PROTOBUF optional Example: `AVRO` The type of the schema. `subject_name` string optional Example: `customer-schema` The name of the schema subject. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry` ### Payload Content type `application/json` ```json { "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [\n {\"name\": \"id\", \"type\": \"string\"},\n {\"name\": \"name\", \"type\": \"string\"},\n {\"name\": \"email\", \"type\": \"string\"},\n {\"name\": \"created_at\", \"type\": \"long\"}\n ]\n}\n", "schema_type": "AVRO", "subject_name": "customer-schema" } ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [\n {\"name\": \"id\", \"type\": \"string\"},\n {\"name\": \"name\", \"type\": \"string\"},\n {\"name\": \"email\", \"type\": \"string\"},\n {\"name\": \"created_at\", \"type\": \"long\"}\n ]\n}\n", "schema_type": "AVRO", "subject_name": "customer-schema" }' \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry" ``` #### Responses **201** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `schema` string optional The schema definition in the specified format. `schema_id` integer optional Example: `12345` The id for schema. `schema_type` string, one of: AVRO, JSON, PROTOBUF optional Example: `AVRO` The type of the schema. `subject_name` string optional Example: `customer-schema` The name of the schema subject. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [ \n {\"name\": \"id\", \"type\": \"int\"},\n {\"name\": \"name\", \"type\": \"string\"}\n ]\n} ", "schema_id": 12345, "schema_type": "AVRO", "subject_name": "customer-schema" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Kafka Schema by Subject Name `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}` To get a specific schema by subject name for a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `subject_name` string required Example: `customer-schema` The name of the Kafka schema subject. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}" ``` #### Responses **200** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `schema` string optional The schema definition in the specified format. `schema_id` integer optional Example: `12345` The id for schema. `schema_type` string, one of: AVRO, JSON, PROTOBUF optional Example: `AVRO` The type of the schema. `subject_name` string optional Example: `customer-schema` The name of the schema subject. `version` string optional Example: `1` The version of the schema. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [ \n {\"name\": \"id\", \"type\": \"int\"},\n {\"name\": \"name\", \"type\": \"string\"}\n ]\n} ", "schema_id": 12345, "schema_type": "AVRO", "subject_name": "customer-schema", "version": "1" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` * * * ## DELETE Delete a Kafka Schema by Subject Name `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}` To delete a specific schema by subject name for a Kafka cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `subject_name` string required Example: `customer-schema` The name of the Kafka schema subject. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}" ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` * * * ## GET Get Kafka Schema by Subject Version `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}/versions/{version}` To get a specific schema by subject name for a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME/versions/$VERSION`. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `subject_name` string required Example: `customer-schema` The name of the Kafka schema subject. `version` string required Example: `1` The version of the Kafka schema subject. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}/versions/{version}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/{subject_name}/versions/{version}" ``` #### Responses **200** A JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `schema` string optional The schema definition in the specified format. `schema_id` integer optional Example: `12345` The id for schema. `schema_type` string, one of: AVRO, JSON, PROTOBUF optional Example: `AVRO` The type of the schema. `subject_name` string optional Example: `customer-schema` The name of the schema subject. `version` string optional Example: `1` The version of the schema. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "schema": "{\n \"type\": \"record\",\n \"name\": \"Customer\",\n \"fields\": [ \n {\"name\": \"id\", \"type\": \"int\"},\n {\"name\": \"name\", \"type\": \"string\"}\n ]\n} ", "schema_id": 12345, "schema_type": "AVRO", "subject_name": "customer-schema", "version": "1" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` * * * ## GET Retrieve Schema Registry Configuration for a kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry/config` To retrieve the Schema Registry configuration for a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/config`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/config` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/config" ``` #### Responses **200** A JSON object with a key of compatibility_level. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "compatibility_level": "BACKWARD" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Schema Registry Configuration for a kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry/config` To update the Schema Registry configuration for a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/schema-registry/config`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. #### Request Body: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/config` ### Payload Content type `application/json` ```json { "compatibility_level": "BACKWARD" } ``` ### cURL ```bash curl -X PUT \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "compatibility_level": "BACKWARD" }' \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/config" ``` #### Responses **200** A JSON object with a key of compatibility_level. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "compatibility_level": "BACKWARD" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Schema Registry Configuration for a Subject of kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` To retrieve the Schema Registry configuration for a Subject of a Kafka cluster, send a GET request to `/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `subject_name` string required Example: `customer-schema` The name of the Kafka schema subject. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}" ``` #### Responses **200** A JSON object with a key of compatibility_level. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. `subject_name` string required The name of the schema subject. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "compatibility_level": "BACKWARD", "subject_name": "my-schema-subject" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Schema Registry Configuration for a Subject of kafka Cluster `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` To update the Schema Registry configuration for a Subject of a Kafka cluster, send a PUT request to `/v2/databases/$DATABASE_ID/schema-registry/config/$SUBJECT_NAME`. The response is a JSON object with a `compatibility_level` key, which is set to an object containing any database configuration parameters. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `subject_name` string required Example: `customer-schema` The name of the Kafka schema subject. #### Request Body: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. ##### Request: `/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}` ### Payload Content type `application/json` ```json { "compatibility_level": "BACKWARD" } ``` ### cURL ```bash curl -X PUT \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "compatibility_level": "BACKWARD" }' \ "https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/schema-registry/config/{subject_name}" ``` #### Responses **200** A JSON object with a key of compatibility_level. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `compatibility_level` string (enum) required The compatibility level of the schema registry. `subject_name` string required The name of the schema subject. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "compatibility_level": "BACKWARD", "subject_name": "my-schema-subject" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve Database Clusters' Metrics Endpoint Credentials `/v2/databases/metrics/credentials` To show the credentials for all database clusters' metrics endpoints, send a GET request to `/v2/databases/metrics/credentials`. The result will be a JSON object with a `credentials` key. ##### Request: `/v2/databases/metrics/credentials` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/metrics/credentials" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() creds, _, _ := client.Databases.GetMetricsCredentials(ctx) } ``` #### Responses **200** A JSON object with a key of credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `credentials` object optional **Show child properties** `credentials` object optional **Show child properties** `basic_auth_password` string optional Example: `password` basic authentication password for metrics HTTP endpoint `basic_auth_username` string optional Example: `username` basic authentication username for metrics HTTP endpoint **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "credentials": { "basic_auth_password": "password", "basic_auth_username": "username" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Database Clusters' Metrics Endpoint Credentials `/v2/databases/metrics/credentials` To update the credentials for all database clusters' metrics endpoints, send a PUT request to `/v2/databases/metrics/credentials`. A successful request will receive a 204 No Content status code with no body in response. #### Request Body: `application/json` `credentials` object optional **Show child properties** `basic_auth_password` string optional Example: `password` basic authentication password for metrics HTTP endpoint `basic_auth_username` string optional Example: `username` basic authentication username for metrics HTTP endpoint ##### Request: `/v2/databases/metrics/credentials` ### Payload Content type `application/json` ```json { "credentials": { "basic_auth_password": "new_password", "basic_auth_username": "new_username" } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"credentials": {"basic_auth_username": "new_username", "basic_auth_password": "new_password"}}'\ "https://api.digitalocean.com/v2/databases/metrics/credentials" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, _ = client.Databases.UpdateMetricsCredentials(ctx, &godo.DatabaseUpdateMetricsCredentialsRequest{ Credentials: &godo.DatabaseMetricsCredentials{ BasicAuthUsername: "a_new_username", BasicAuthPassword: "a_new_password", }, }) } ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Indexes for a OpenSearch Cluster `/v2/databases/{database_cluster_uuid}/indexes` To list all of a OpenSearch cluster's indexes, send a GET request to `/v2/databases/$DATABASE_ID/indexes`. The result will be a JSON object with a `indexes` key. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. ##### Request: `/v2/databases/{database_cluster_uuid}/indexes` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/indexes" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() replicas, _, err := client.Databases.ListIndexes(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", nil) } ``` #### Responses **200** A JSON object with a key of indexes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `indexes` array of object optional **Show child properties** `created_time` string (date-time) optional Example: `2021-01-01T00:00:00Z` The date and time the index was created. `index_name` string optional Example: `events` The name of the opensearch index. `number_of_replicas` integer optional Example: `3` The number of replicas for the index. `number_of_shards` integer optional Example: `2` The number of shards for the index. `size` integer optional Example: `208` The size of the index. `health` string, one of: unknown, green, yellow, red, red* optional Example: `green` The health of the OpenSearch index. `status` string, one of: unknown, open, close, none optional Example: `open` The status of the OpenSearch index. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "indexes": [ { "created_time": "2021-01-01T00:00:00Z", "health": "green", "index_name": "sample-data", "number_of_replicas": 3, "number_of_shards": 2, "size": 208, "status": "open" }, { "created_time": "2021-01-01T00:00:00Z", "health": "green", "index_name": "logs-*", "number_of_replicas": 3, "number_of_shards": 2, "size": 208, "status": "open" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Index for OpenSearch Cluster `/v2/databases/{database_cluster_uuid}/indexes/{index_name}` To delete a single index within OpenSearch cluster, send a DELETE request to `/v2/databases/$DATABASE_ID/indexes/$INDEX_NAME`. A status of 204 will be given. This indicates that the request was processed successfully, but that no response body is needed. #### Path Parameters `database_cluster_uuid` string (uuid) required Example: `9cc10173-e9ea-4176-9dbc-a4cee4c4ff30` A unique identifier for a database cluster. `index_name` string required Example: `logs-*` The name of the OpenSearch index. ##### Request: `/v2/databases/{database_cluster_uuid}/indexes/{index_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/indexes/sample-index" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() indexName := "sampe-index" _, err := client.Databases.DeleteIndex(ctx, "9cc10173-e9ea-4176-9dbc-a4cee4c4ff30", indexName) } ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/dedicated-inference/ --- title: Dedicated Inference description: '[Dedicated Inference](https://docs.digitalocean.com/products/agent-platform/dedicated-inference/) delivers scalable production-grade LLM hosting on …' product: Reference url: https://docs.digitalocean.com/reference/api/reference/dedicated-inference/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Dedicated Inference Generated on 4 Dec 2026 [Dedicated Inference](https://docs.digitalocean.com/products/agent-platform/dedicated-inference/index.html.md) delivers scalable production-grade LLM hosting on DigitalOcean. Create, list, get, update, and delete Dedicated Inference instances; manage accelerators, CA certificate, sizes, GPU model config, and access tokens. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [Get a Dedicated Inference](#dedicatedInferences_get) - **PATCH** [Update a Dedicated Inference](#dedicatedInferences_patch) - **DELETE** [Delete a Dedicated Inference](#dedicatedInferences_delete) - **GET** [List Dedicated Inferences](#dedicatedInferences_list) - **POST** [Create a Dedicated Inference](#dedicatedInferences_create) - **GET** [List Dedicated Inference Accelerators](#dedicatedInferences_list_accelerators) - **GET** [Get a Dedicated Inference Accelerator](#dedicatedInferences_get_accelerator) - **GET** [Get Dedicated Inference CA Certificate](#dedicatedInferences_get_ca) - **GET** [List Dedicated Inference Tokens](#dedicatedInferences_list_tokens) - **POST** [Create a Dedicated Inference Token](#dedicatedInferences_create_tokens) - **DELETE** [Revoke a Dedicated Inference Token](#dedicatedInferences_delete_tokens) - **GET** [List Dedicated Inference Sizes](#dedicatedInferences_list_sizes) - **GET** [Get Dedicated Inference GPU Model Config](#dedicatedInferences_get_gpu_model_config) ## GET Get a Dedicated Inference `/v2/dedicated-inferences/{dedicated_inference_id}` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: dedicated_inference:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Retrieve an existing Dedicated Inference by ID. Send a GET request to `/v2/dedicated-inferences/{dedicated_inference_id}`. The status in the response is one of active, new, provisioning, updating, deleting, or error. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** Response containing a single Dedicated Inference instance. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `dedicated_inference` object optional A Dedicated Inference instance. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was created. `endpoints` object optional read-only **Show child properties** `private_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai` Private VPC FQDN of the Dedicated Inference instance. `public_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai` Public FQDN of the Dedicated Inference instance. `id` string (uuid) optional read-only Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` Unique ID of the Dedicated Inference. `pending_deployment_spec` object optional Pending deployment when status is provisioning or updating. **Show child properties** `created_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `enable_public_endpoint` boolean optional Whether to expose a public LLM endpoint. `id` string (uuid) optional Example: `7c6d729d-360d-44db-88e3-58e98281d12e` Deployment UUID. `model_deployments` array of object optional At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `status` string, one of: provisioning, updating optional Example: `provisioning` `updated_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `version` integer optional Example: `1` Spec version. `vpc` object optional **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `region` string optional read-only Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `spec` object optional Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `status` string (enum) optional read-only Example: `active` Current state of the Dedicated Inference. `updated_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was last updated. `vpc_uuid` string (uuid) optional read-only Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID of the Dedicated Inference. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "dedicated_inference": { "created_at": "2024-01-09T20:44:32Z", "endpoints": { "private_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai", "public_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai" }, "id": "6b5c619c-359c-44ca-87e2-47e98170c01d", "region": "atl1", "status": "active", "updated_at": "2024-01-09T20:44:32Z", "vpc_uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update a Dedicated Inference `/v2/dedicated-inferences/{dedicated_inference_id}` Update an existing Dedicated Inference. Send a PATCH request to `/v2/dedicated-inferences/{dedicated_inference_id}` with updated `spec` and/or `access_tokens`. Status will move to updating and return to active when done. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. #### Request Body: `application/json` `access_tokens` object optional Provider tokens for model access (e.g. gated Hugging Face models). **Show child properties** `hugging_face_token` string optional Example: `$HF_TOKEN` Hugging Face token required for gated models. `spec` object optional Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. **Show child properties** `accelerator_slug` string required Example: `gpu-mi300x1-192gb` DigitalOcean GPU slug. `scale` integer required Example: `1` Number of accelerator instances. `status` string, one of: new, provisioning, active optional read-only Example: `active` Current state of the Accelerator. `type` string required Example: `prefill_decode` Accelerator type (e.g. prefill_decode). `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}` ### Payload Content type `application/json` ```json { "access_tokens": { "hugging_face_token": "$HF_TOKEN" }, "spec": { "enable_public_endpoint": true, "model_deployments": [], "name": "new-dedicated-inference", "region": "atl1", "version": 1, "vpc": { "uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" } } } ``` ### cURL ```bash curl -i -X PATCH "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" \ -d '{ "spec": { "version": 1, "name": "renamed-dedicated-inference", "region": "atl1", "vpc": { "uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" }, "enable_public_endpoint": true, "model_deployments": [{ "model_slug": "mistral/mistral-7b-instruct-v3", "model_provider": "hugging_face", "workload_config": {}, "accelerators": [{ "scale": 2, "type": "prefill_decode", "accelerator_slug": "gpu-mi300x1-192gb" }] }] }, "access_tokens": { "hugging_face_token": "$HF_TOKEN" } }' ``` #### Responses **202** Dedicated Inference update accepted for processing (202). Response contains only the dedicated_inference; no token is returned. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `dedicated_inference` object optional A Dedicated Inference instance. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was created. `endpoints` object optional read-only **Show child properties** `private_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai` Private VPC FQDN of the Dedicated Inference instance. `public_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai` Public FQDN of the Dedicated Inference instance. `id` string (uuid) optional read-only Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` Unique ID of the Dedicated Inference. `pending_deployment_spec` object optional Pending deployment when status is provisioning or updating. **Show child properties** `created_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `enable_public_endpoint` boolean optional Whether to expose a public LLM endpoint. `id` string (uuid) optional Example: `7c6d729d-360d-44db-88e3-58e98281d12e` Deployment UUID. `model_deployments` array of object optional At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `status` string, one of: provisioning, updating optional Example: `provisioning` `updated_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `version` integer optional Example: `1` Spec version. `vpc` object optional **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `region` string optional read-only Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `spec` object optional Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `status` string (enum) optional read-only Example: `active` Current state of the Dedicated Inference. `updated_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was last updated. `vpc_uuid` string (uuid) optional read-only Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID of the Dedicated Inference. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "dedicated_inference": { "created_at": "2024-01-09T20:44:32Z", "endpoints": { "private_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai", "public_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai" }, "id": "6b5c619c-359c-44ca-87e2-47e98170c01d", "pending_deployment_spec": { "created_at": "2024-01-09T20:44:32Z", "enable_public_endpoint": true, "id": "7c6d729d-360d-44db-88e3-58e98281d12e", "model_deployments": [], "name": "new-dedicated-inference", "status": "provisioning", "updated_at": "2024-01-09T20:44:32Z", "version": 1 }, "region": "atl1", "spec": { "enable_public_endpoint": true, "model_deployments": [], "name": "new-dedicated-inference", "region": "atl1", "version": 1 }, "status": "active", "updated_at": "2024-01-09T20:44:32Z", "vpc_uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Dedicated Inference `/v2/dedicated-inferences/{dedicated_inference_id}` Delete an existing Dedicated Inference. Send a DELETE request to `/v2/dedicated-inferences/{dedicated_inference_id}`. The response 202 Accepted indicates the request was accepted for processing. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}` ### cURL ```bash curl -i -X DELETE "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **202** This does not indicate the success or failure of any operation, just that the request has been accepted for processing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Dedicated Inferences `/v2/dedicated-inferences` List all Dedicated Inference instances for your team. Send a GET request to `/v2/dedicated-inferences`. You may filter by region and use page and per_page for pagination. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `region` string, one of: nyc2, tor1, atl1 optional Example: `atl1` Filter by region. Dedicated Inference is only available in nyc2, tor1, and atl1. ##### Request: `/v2/dedicated-inferences` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences?region=nyc2&page=1&per_page=20" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** The response will be a JSON object with a key called dedicated_inferences. This will be set to an array of objects, each of which will contain the standard attributes associated with a Dedicated Inference. Pagination uses the same links and meta structure as other list endpoints. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `dedicated_inferences` array of object required Array of Dedicated Inference instances. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was created. `endpoints` object optional read-only **Show child properties** `private_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai` Private VPC FQDN of the Dedicated Inference instance. `public_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai` Public FQDN of the Dedicated Inference instance. `id` string (uuid) optional read-only Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` Unique ID of the Dedicated Inference. `pending_deployment_spec` object optional Pending deployment when status is provisioning or updating. **Show child properties** `created_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `enable_public_endpoint` boolean optional Whether to expose a public LLM endpoint. `id` string (uuid) optional Example: `7c6d729d-360d-44db-88e3-58e98281d12e` Deployment UUID. `model_deployments` array of object optional At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `status` string, one of: provisioning, updating optional Example: `provisioning` `updated_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `version` integer optional Example: `1` Spec version. `vpc` object optional **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `region` string optional read-only Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `spec` object optional Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `status` string (enum) optional read-only Example: `active` Current state of the Dedicated Inference. `updated_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was last updated. `vpc_uuid` string (uuid) optional read-only Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID of the Dedicated Inference. `links` object required **Show child properties** `pages` object optional Pagination links (first, prev, next, last). `meta` object required **Show child properties** `total` integer required Example: `1` Total number of results. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "dedicated_inferences": [ { "created_at": "2024-01-09T20:44:32Z", "endpoints": { "private_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai", "public_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai" }, "id": "6b5c619c-359c-44ca-87e2-47e98170c01d", "region": "atl1", "status": "active", "updated_at": "2024-01-09T20:44:32Z", "vpc_uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" } ], "links": { "pages": { "first": "https://api.digitalocean.com/v2/dedicated-inferences?page=1\u0026per_page=20", "last": "https://api.digitalocean.com/v2/dedicated-inferences?page=1\u0026per_page=20" } }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Dedicated Inference `/v2/dedicated-inferences` Create a new Dedicated Inference for your team. Send a POST request to `/v2/dedicated-inferences` with a `spec` object (version, name, region, vpc, enable_public_endpoint, model_deployments) and optional `access_tokens` (e.g. hugging_face_token for gated models). The response code 202 Accepted indicates the request was accepted for processing; it does not indicate success or failure. The token value is returned only on create; store it securely. #### Request Body: `application/json` `access_tokens` object optional Example: `{"hugging_face_token":"$HF_TOKEN"}` Key-value pairs for provider tokens (e.g. Hugging Face). `spec` object required Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. **Show child properties** `accelerator_slug` string required Example: `gpu-mi300x1-192gb` DigitalOcean GPU slug. `scale` integer required Example: `1` Number of accelerator instances. `status` string, one of: new, provisioning, active optional read-only Example: `active` Current state of the Accelerator. `type` string required Example: `prefill_decode` Accelerator type (e.g. prefill_decode). `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. ##### Request: `/v2/dedicated-inferences` ### Payload Content type `application/json` ```json { "access_tokens": { "hugging_face_token": "$HF_TOKEN" }, "spec": { "enable_public_endpoint": true, "model_deployments": [], "name": "new-dedicated-inference", "region": "atl1", "version": 1, "vpc": { "uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" } } } ``` ### cURL ```bash curl -i -X POST "https://api.digitalocean.com/v2/dedicated-inferences" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" \ -d '{ "spec": { "version": 1, "name": "new-dedicated-inference", "region": "atl1", "vpc": { "uuid": "7e5c619c-359c-44ca-87e2-47e98170c012" }, "enable_public_endpoint": true, "model_deployments": [{ "model_slug": "mistral/mistral-7b-instruct-v3", "model_provider": "hugging_face", "workload_config": {}, "accelerators": [{ "scale": 2, "type": "prefill_decode", "accelerator_slug": "gpu-mi300x1-192gb" }] }] }, "access_tokens": { "hugging_face_token": "$HF_TOKEN" } }' ``` #### Responses **202** Dedicated Inference create/update accepted for processing (202). Success or failure is not indicated by the response code. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `dedicated_inference` object optional A Dedicated Inference instance. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was created. `endpoints` object optional read-only **Show child properties** `private_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai` Private VPC FQDN of the Dedicated Inference instance. `public_endpoint_fqdn` string (uri) optional Example: `https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai` Public FQDN of the Dedicated Inference instance. `id` string (uuid) optional read-only Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` Unique ID of the Dedicated Inference. `pending_deployment_spec` object optional Pending deployment when status is provisioning or updating. **Show child properties** `created_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `enable_public_endpoint` boolean optional Whether to expose a public LLM endpoint. `id` string (uuid) optional Example: `7c6d729d-360d-44db-88e3-58e98281d12e` Deployment UUID. `model_deployments` array of object optional At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `status` string, one of: provisioning, updating optional Example: `provisioning` `updated_at` string (date-time) optional Example: `2024-01-09T20:44:32Z` `version` integer optional Example: `1` Spec version. `vpc` object optional **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `region` string optional read-only Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `spec` object optional Structured configuration for a Dedicated Inference deployment. **Show child properties** `enable_public_endpoint` boolean required Whether to expose a public LLM endpoint. `model_deployments` array of object required At least one model deployment is required. **Show child properties** `accelerators` array of object optional Accelerator configuration for this deployment. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `model_id` string optional Used to identify an existing deployment when updating; empty means create new. `model_provider` string, one of: hugging_face optional Example: `hugging_face` Model provider. `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` Model identifier (e.g. Hugging Face slug). `workload_config` object optional Workload-specific configuration (e.g. ISL/OSL in future). *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string required Example: `new-dedicated-inference` Name of the Dedicated Inference. Must be unique within the team. `region` string, one of: atl1, nyc2, tor1 required Example: `atl1` DigitalOcean region where the Dedicated Inference is hosted. `version` integer required Example: `1` Spec version. `vpc` object required **Show child properties** `uuid` string (uuid) required Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID for the Dedicated Inference. `status` string (enum) optional read-only Example: `active` Current state of the Dedicated Inference. `updated_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` When the Dedicated Inference was last updated. `vpc_uuid` string (uuid) optional read-only Example: `997615ce-132d-4bae-9270-9ee21b395e5d` VPC UUID of the Dedicated Inference. `token` object optional Access token for authenticating to Dedicated Inference endpoints. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` `id` string (uuid) optional read-only Example: `01333f14-a903-4b8e-92b3-363a767aa052` Unique ID of the token. `is_managed` boolean optional read-only Example: `false` When true, the token is managed by DigitalOcean (for example, system-provisioned). When false, the token was created by the user. `name` string optional read-only Example: `first-token` Name of the token. `value` string optional read-only Example: `di_xxxxxxxxxxxxxxxxxxxxxxxx` Token value; only returned once on create. Store securely. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "dedicated_inference": { "created_at": "2024-01-09T20:44:32Z", "endpoints": { "private_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-private-dedicated-inference.do-infra.ai", "public_endpoint_fqdn": "https://b4bfug4jc41kts2ro54if91eo-public-dedicated-inference.do-infra.ai" }, "id": "6b5c619c-359c-44ca-87e2-47e98170c01d", "pending_deployment_spec": { "created_at": "2024-01-09T20:44:32Z", "enable_public_endpoint": true, "id": "7c6d729d-360d-44db-88e3-58e98281d12e", "model_deployments": [], "name": "new-dedicated-inference", "status": "provisioning", "updated_at": "2024-01-09T20:44:32Z", "version": 1 }, "region": "atl1", "spec": { "enable_public_endpoint": true, "model_deployments": [], "name": "new-dedicated-inference", "region": "atl1", "version": 1 }, "status": "active", "updated_at": "2024-01-09T20:44:32Z", "vpc_uuid": "997615ce-132d-4bae-9270-9ee21b395e5d" }, "token": { "created_at": "2024-01-09T20:44:32Z", "id": "01333f14-a903-4b8e-92b3-363a767aa052", "is_managed": false, "name": "first-token", "value": "di_xxxxxxxxxxxxxxxxxxxxxxxx" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Dedicated Inference Accelerators `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators` List all accelerators (GPUs) in use by a Dedicated Inference instance. Send a GET request to `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators`. Optionally filter by slug and use page/per_page for pagination. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `20` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `slug` string optional Example: `gpu-mi300x1-192gb` Filter accelerators by GPU slug. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** The response will be a JSON object with a key called accelerators. This will be set to an array of accelerator objects. Pagination uses the same links and meta structure as other list endpoints. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `accelerators` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` `id` string (uuid) optional read-only Example: `5b5c619c-359c-44ca-87e2-47e98170c02f` Unique ID of the accelerator. `name` string optional read-only Example: `mi300x1-ghfpsf` Name of the accelerator. `role` string optional read-only Example: `prefill_decode` Role of the accelerator (e.g. prefill_decode). `slug` string optional read-only Example: `gpu-mi300x1-192gb` DigitalOcean GPU slug. `status` string optional read-only Example: `active` Status of the accelerator. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "accelerators": [ { "created_at": "2024-01-09T20:44:32Z", "id": "5b5c619c-359c-44ca-87e2-47e98170c02f", "name": "mi300x1-ghfpsf", "role": "prefill_and_decode", "slug": "gpu-mi300x1-192gb", "status": "active" } ], "links": { "pages": { "first": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators?page=1\u0026per_page=20", "last": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators?page=1\u0026per_page=20" } }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a Dedicated Inference Accelerator `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators/{accelerator_id}` Retrieve a single accelerator by ID for a Dedicated Inference instance. Send a GET request to `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators/{accelerator_id}`. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. `accelerator_id` string (uuid) required Example: `5b5c619c-359c-44ca-87e2-47e98170c02f` A unique identifier for a Dedicated Inference accelerator. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/accelerators/{accelerator_id}` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/accelerators/5b5c619c-359c-44ca-87e2-47e98170c02f" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** Single accelerator object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` `id` string (uuid) optional read-only Example: `5b5c619c-359c-44ca-87e2-47e98170c02f` Unique ID of the accelerator. `name` string optional read-only Example: `mi300x1-ghfpsf` Name of the accelerator. `role` string optional read-only Example: `prefill_decode` Role of the accelerator (e.g. prefill_decode). `slug` string optional read-only Example: `gpu-mi300x1-192gb` DigitalOcean GPU slug. `status` string optional read-only Example: `active` Status of the accelerator. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "created_at": "2024-01-09T20:44:32Z", "id": "5b5c619c-359c-44ca-87e2-47e98170c02f", "name": "mi300x1-ghfpsf", "role": "prefill_decode", "slug": "gpu-mi300x1-192gb", "status": "active" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Dedicated Inference CA Certificate `/v2/dedicated-inferences/{dedicated_inference_id}/ca` Get the CA certificate for a Dedicated Inference instance (base64-encoded). Required for private endpoint connectivity. Send a GET request to `/v2/dedicated-inferences/{dedicated_inference_id}/ca`. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/ca` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/ca" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** CA certificate for the Dedicated Inference (base64-encoded). Required for private endpoint connectivity. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `cert` string required Base64-encoded CA certificate. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "cert": "LS0tLS1CRUdJTi..." } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Dedicated Inference Tokens `/v2/dedicated-inferences/{dedicated_inference_id}/tokens` List all access tokens for a Dedicated Inference instance. Token values are not returned; only id, name, created_at, and is_managed. Send a GET request to `/v2/dedicated-inferences/{dedicated_inference_id}/tokens`. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/tokens` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/tokens?page=1&per_page=20" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** The response will be a JSON object with a key called tokens. This will be set to an array of objects (id, name, created_at, is_managed; value is not returned). Pagination uses the same links and meta structure as other list endpoints (e.g. VPC peerings). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `tokens` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` `id` string (uuid) optional read-only Example: `01333f14-a903-4b8e-92b3-363a767aa052` Unique ID of the token. `is_managed` boolean optional read-only Example: `false` When true, the token is managed by DigitalOcean (for example, system-provisioned). When false, the token was created by the user. `name` string optional read-only Example: `first-token` Name of the token. `value` string optional read-only Example: `di_xxxxxxxxxxxxxxxxxxxxxxxx` Token value; only returned once on create. Store securely. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": { "pages": { "first": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/tokens?page=1\u0026per_page=20", "last": "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/tokens?page=1\u0026per_page=20" } }, "meta": { "total": 0 }, "tokens": [] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Dedicated Inference Token `/v2/dedicated-inferences/{dedicated_inference_id}/tokens` Create a new access token for a Dedicated Inference instance. Send a POST request to `/v2/dedicated-inferences/{dedicated_inference_id}/tokens` with a `name`. The token value is returned only once in the response; store it securely. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. #### Request Body: `application/json` `name` string required Example: `new-inference-token` Name for the new token. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/tokens` ### Payload Content type `application/json` ```json { "name": "new-inference-token" } ``` ### cURL ```bash curl -i -X POST "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/tokens" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" \ -d '{"name": "new-inference-token"}' ``` #### Responses **202** Token created; value is returned only once. Store securely. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `token` object optional Access token for authenticating to Dedicated Inference endpoints. **Show child properties** `created_at` string (date-time) optional read-only Example: `2024-01-09T20:44:32Z` `id` string (uuid) optional read-only Example: `01333f14-a903-4b8e-92b3-363a767aa052` Unique ID of the token. `is_managed` boolean optional read-only Example: `false` When true, the token is managed by DigitalOcean (for example, system-provisioned). When false, the token was created by the user. `name` string optional read-only Example: `first-token` Name of the token. `value` string optional read-only Example: `di_xxxxxxxxxxxxxxxxxxxxxxxx` Token value; only returned once on create. Store securely. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "token": { "created_at": "2024-01-09T20:44:32Z", "id": "01333f14-a903-4b8e-92b3-363a767aa052", "is_managed": false, "name": "first-token", "value": "di_xxxxxxxxxxxxxxxxxxxxxxxx" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Revoke a Dedicated Inference Token `/v2/dedicated-inferences/{dedicated_inference_id}/tokens/{token_id}` Revoke (delete) an access token for a Dedicated Inference instance. Send a DELETE request to `/v2/dedicated-inferences/{dedicated_inference_id}/tokens/{token_id}`. #### Path Parameters `dedicated_inference_id` string (uuid) required Example: `6b5c619c-359c-44ca-87e2-47e98170c01d` A unique identifier for a Dedicated Inference instance. `token_id` string (uuid) required Example: `f11d4795-c1db-4ac3-9aa6-a0ea3c58877e` A unique identifier for a Dedicated Inference access token. ##### Request: `/v2/dedicated-inferences/{dedicated_inference_id}/tokens/{token_id}` ### cURL ```bash curl -i -X DELETE "https://api.digitalocean.com/v2/dedicated-inferences/6b5c619c-359c-44ca-87e2-47e98170c01d/tokens/f11d4795-c1db-4ac3-9aa6-a0ea3c58877e" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **204** Token revoked. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Dedicated Inference Sizes `/v2/dedicated-inferences/sizes` Get available Dedicated Inference sizes and pricing for supported GPUs. Send a GET request to `/v2/dedicated-inferences/sizes`. ##### Request: `/v2/dedicated-inferences/sizes` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/sizes" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** Enabled regions and sizes with pricing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `enabled_regions` array of string optional Example: `["nyc2","atl1"]` Regions where Dedicated Inference is available. `sizes` array of object optional **Show child properties** `currency` string optional Example: `USD` `gpu_slug` string optional Example: `gpu-mi300x1-192gb` `price_per_hour` string optional Example: `2` `region` string optional Example: `nyc2` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "enabled_regions": [ "nyc2", "atl1" ], "sizes": [ { "currency": "USD", "gpu_slug": "gpu-mi300x1-192gb", "price_per_hour": "2", "region": "nyc2" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Dedicated Inference GPU Model Config `/v2/dedicated-inferences/gpu-model-config` Get supported GPU and model configurations for Dedicated Inference. Use this to discover supported GPU slugs and model slugs (e.g. Hugging Face). Send a GET request to `/v2/dedicated-inferences/gpu-model-config`. ##### Request: `/v2/dedicated-inferences/gpu-model-config` ### cURL ```bash curl -i -X GET "https://api.digitalocean.com/v2/dedicated-inferences/gpu-model-config" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DO_TOKEN" ``` #### Responses **200** GPU model configs (gpu_slugs, model_slug, model_name, is_gated_model). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `gpu_model_configs` array of object optional **Show child properties** `gpu_slugs` array of string optional Example: `["gpu-mi300x1-192gb"]` `is_gated_model` boolean optional Whether the model requires gated access (e.g. Hugging Face token). `model_name` string optional Example: `Mistral-7B-Instruct-v0.3` `model_slug` string optional Example: `mistral/mistral-7b-instruct-v3` **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "gpu_model_configs": [ { "gpu_slugs": [ "gpu-mi300x1-192gb" ], "is_gated_model": true, "model_name": "Mistral-7B-Instruct-v0.3", "model_slug": "mistral/mistral-7b-instruct-v3" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Inference Pricing](https://docs.digitalocean.com/products/inference/details/pricing/index.html.md), [Supported Models on DigitalOcean Inference](https://docs.digitalocean.com/products/inference/details/models/index.html.md), [Use Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/domain-records/ --- title: Domain Records description: Domain record resources are used to set or retrieve information about the individual DNS records configured for a domain. This allows you to build and … product: Reference url: https://docs.digitalocean.com/reference/api/reference/domain-records/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Domain Records Generated on 4 Dec 2026 Domain record resources are used to set or retrieve information about the individual DNS records configured for a domain. This allows you to build and manage DNS zone files by adding and modifying individual records for a domain. The [DigitalOcean DNS management interface](https://docs.digitalocean.com/products/networking/dns/index.html.md) allows you to configure the following DNS records: | Name | Description | |---|---| | A | This record type is used to map an IPv4 address to a hostname. | | AAAA | This record type is used to map an IPv6 address to a hostname. | | CAA | As specified in RFC-6844, this record type can be used to restrict which certificate authorities are permitted to issue certificates for a domain. | | CNAME | This record type defines an alias for your canonical hostname (the one defined by an A or AAAA record). | | MX | This record type is used to define the mail exchanges used for the domain. | | NS | This record type defines the name servers that are used for this zone. | | TXT | This record type is used to associate a string of text with a hostname, primarily used for verification. | | SRV | This record type specifies the location (hostname and port number) of servers for specific services. | | SOA | This record type defines administrative information about the zone. Can only have ttl changed, cannot be deleted | Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Domain Records](#domains_list_records) - **POST** [Create a New Domain Record](#domains_create_record) - **GET** [Retrieve an Existing Domain Record](#domains_get_record) - **PUT** [Update a Domain Record](#domains_update_record) - **PATCH** [Update a Domain Record](#domains_patch_record) - **DELETE** [Delete a Domain Record](#domains_delete_record) ## GET List All Domain Records `/v2/domains/{domain_name}/records` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: domain:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To get a listing of all records configured for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records`. The list of records returned can be filtered by using the `name` and `type` query parameters. For example, to only include A records for a domain, send a GET request to `/v2/domains/$DOMAIN_NAME/records?type=A`. `name` must be a fully qualified record name. For example, to only include records matching `sub.example.com`, send a GET request to `/v2/domains/$DOMAIN_NAME/records?name=sub.example.com`. Both name and type may be used together. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. #### Query Parameters `name` string optional Example: `sub.example.com` A fully qualified record name. For example, to only include records matching sub.example.com, send a GET request to `/v2/domains/$DOMAIN_NAME/records?name=sub.example.com`. `type` string (enum) optional Example: `A` The type of the DNS record. For example: A, CNAME, TXT, ... `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/domains/{domain_name}/records` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains/example.com/records" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } domains, _, err := client.Domains.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) records = client.domain_records.all(for_domain: 'example.com') records.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.domains.list_records(domain_name="example.com") ``` #### Responses **200** The response will be a JSON object with a key called domain_records. The value of this will be an array of domain record objects, each of which contains the standard domain record attributes. For attributes that are not used by a specific record type, a value of null will be returned. For instance, all records other than SRV will have null for the weight and port attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain_records` array of object optional **Show child properties** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domain_records": [ { "data": "ns1.digitalocean.com", "flags": null, "id": 28448429, "name": "@", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "NS", "weight": null }, { "data": "ns2.digitalocean.com", "flags": null, "id": 28448430, "name": "@", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "NS", "weight": null }, { "data": "ns3.digitalocean.com", "flags": null, "id": 28448431, "name": "@", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "NS", "weight": null }, { "data": "1.2.3.4", "flags": null, "id": 28448432, "name": "@", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } ], "links": {}, "meta": { "total": 4 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Domain Record `/v2/domains/{domain_name}/records` To create a new record to a domain, send a POST request to `/v2/domains/$DOMAIN_NAME/records`. The request must include all of the required fields for the domain record type being added. See the [attribute table](https://docs.digitalocean.com/reference/api/reference/domain-records/index.html.md) for details regarding record types and their respective required attributes. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. #### Request Body: `application/json` **A** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **AAAA** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **CAA** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **CNAME** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **MX** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **NS** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **SOA** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **SRV** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **TXT** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. ##### Request: `/v2/domains/{domain_name}/records` ### Payload Content type `application/json` ```json { "data": "162.10.66.0", "flags": null, "name": "www", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"A","name":"www","data":"162.10.66.0","priority":null,"port":null,"ttl":1800,"weight":null,"flags":null,"tag":null}' \ "https://api.digitalocean.com/v2/domains/example.com/records" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.DomainRecordEditRequest{ Type: "A", Name: "www", Data: "1.2.3.4", } domainRecord, _, err := client.Domains.CreateRecord(ctx, "example.com", createRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) record = DropletKit::DomainRecord.new( type: 'A', name: 'www', data: '162.10.66.0' ) client.domain_records.create(record, for_domain: 'example.com') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "A", "name": "www", "data": "162.10.66.0", "priority": None, "port": None, "ttl": 1800, "weight": None, "flags": None, "tag": None } resp = client.domains.create_record(domain_name="example.com", body=req) ``` #### Responses **201** The response body will be a JSON object with a key called domain_record. The value of this will be an object representing the new record. Attributes that are not applicable for the record type will be set to null. An id attribute is generated for each record as part of the object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain_record` object optional **Show child properties** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "domain_record": { "data": "162.10.66.0", "flags": null, "id": 28448433, "name": "www", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Domain Record `/v2/domains/{domain_name}/records/{domain_record_id}` To retrieve a specific domain record, send a GET request to `/v2/domains/$DOMAIN_NAME/records/$RECORD_ID`. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. `domain_record_id` integer required Example: `3352896` The unique identifier of the domain record. ##### Request: `/v2/domains/{domain_name}/records/{domain_record_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains/example.com/records/3352896" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() record, _, err := client.Domains.Record(ctx, "example.com", 3352896) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.domain_records.find(for_domain: 'example.com', id: 3352896) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) get_resp = client.domains.get_record(domain_name="example.com", domain_record_id=3352896) ``` #### Responses **200** The response will be a JSON object with a key called domain_record. The value of this will be a domain record object which contains the standard domain record attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain_record` object optional **Show child properties** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domain_record": { "data": "162.10.66.0", "flags": null, "id": 3352896, "name": "blog", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Domain Record `/v2/domains/{domain_name}/records/{domain_record_id}` To update an existing record, send a PUT request to `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for the record type can be set to a new value for the record. See the [attribute table](https://docs.digitalocean.com/reference/api/reference/domain-records/index.html.md) for details regarding record types and their respective attributes. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. `domain_record_id` integer required Example: `3352896` The unique identifier of the domain record. #### Request Body: `application/json` `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. ##### Request: `/v2/domains/{domain_name}/records/{domain_record_id}` ### Payload Content type `application/json` ```json { "name": "blog", "type": "CNAME" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"blog"}' \ "https://api.digitalocean.com/v2/domains/example.com/records/3352896" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() editRequest := &godo.DomainRecordEditRequest{ Type: "A", Name: "blog", } domainRecord, _, err := client.Domains.EditRecord(ctx, "example.com", 3352896, editRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) record = DropletKit::DomainRecord.new(name: 'blog') client.domain_records.update(record, for_domain: 'example.com', id: 3352896) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "blog", "type": "CNAME" } resp = client.domains.update_record(domain_name="example.com", domain_record_id=2432342, body=req) ``` #### Responses **200** The response will be a JSON object with a key called domain_record. The value of this will be a domain record object which contains the standard domain record attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain_record` object optional **Show child properties** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domain_record": { "data": "162.10.66.0", "flags": null, "id": 3352896, "name": "blog", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update a Domain Record `/v2/domains/{domain_name}/records/{domain_record_id}` To update an existing record, send a PATCH request to `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. Any attribute valid for the record type can be set to a new value for the record. See the [attribute table](https://docs.digitalocean.com/reference/api/reference/domain-records/index.html.md) for details regarding record types and their respective attributes. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. `domain_record_id` integer required Example: `3352896` The unique identifier of the domain record. #### Request Body: `application/json` `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. ##### Request: `/v2/domains/{domain_name}/records/{domain_record_id}` ### Payload Content type `application/json` ```json { "name": "blog", "type": "A" } ``` ### cURL ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"blog","type":"A"}' \ "https://api.digitalocean.com/v2/domains/example.com/records/3352896" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "blog", "type": "A" } resp = client.domains.patch_record(domain_name="example.com", domain_record_id=2432342, body=req) ``` #### Responses **200** The response will be a JSON object with a key called domain_record. The value of this will be a domain record object which contains the standard domain record attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain_record` object optional **Show child properties** `data` string optional Example: `ns1.digitalocean.com` Variable data depending on record type. For example, the "data" value for an A record would be the IPv4 address to which the domain will be mapped. For a CAA record, it would contain the domain name of the CA being granted permission to issue certificates. `flags` integer optional Nullable An unsigned integer between 0-255 used for CAA records. `id` integer optional read-only Example: `28448429` A unique identifier for each domain record. `name` string optional Example: `@` The host name, alias, or service being defined by the record. `port` integer optional Nullable The port for SRV records. `priority` integer optional Nullable The priority for SRV and MX records. `tag` string optional Nullable The parameter tag for CAA records. Valid values are "issue", "issuewild", or "iodef" `ttl` integer optional Example: `1800` This value is the time to live for the record, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `type` string required Example: `NS` The type of the DNS record. For example: A, CNAME, TXT, ... `weight` integer optional Nullable The weight for SRV records. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domain_record": { "data": "162.10.66.0", "flags": null, "id": 3352896, "name": "blog", "port": null, "priority": null, "tag": null, "ttl": 1800, "type": "A", "weight": null } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Domain Record `/v2/domains/{domain_name}/records/{domain_record_id}` To delete a record for a domain, send a DELETE request to `/v2/domains/$DOMAIN_NAME/records/$DOMAIN_RECORD_ID`. The record will be deleted and the response status will be a 204. This indicates a successful request with no body returned. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. `domain_record_id` integer required Example: `3352896` The unique identifier of the domain record. ##### Request: `/v2/domains/{domain_name}/records/{domain_record_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains/example.com/records/3352896" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Domains.DeleteRecord(ctx, "example.com", 3352896) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.domain_records.delete(for_domain: 'example.com', id: 3352896) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example.com" } resp = client.domains.delete_record(domain_name="example.com", domain_record_id=3352896) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Point to DigitalOcean Name Servers From Common Domain Registrars](https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/index.html.md), [How to Create, Edit, and Delete DNS Records](https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/index.html.md), [How to Add Domains](https://docs.digitalocean.com/products/networking/dns/how-to/add-domains/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/domains/ --- title: Domains description: Domain resources are domain names that you have purchased from a domain name registrar that you are managing through the [DigitalOcean DNS … product: Reference url: https://docs.digitalocean.com/reference/api/reference/domains/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Domains Generated on 4 Dec 2026 Domain resources are domain names that you have purchased from a domain name registrar that you are managing through the [DigitalOcean DNS interface](https://docs.digitalocean.com/products/networking/dns/index.html.md). This resource establishes top-level control over each domain. Actions that affect individual domain records should be taken on the [Domain Records](https://docs.digitalocean.com/reference/api/reference/domain-records/index.html.md) resource. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Domains](#domains_list) - **POST** [Create a New Domain](#domains_create) - **GET** [Retrieve an Existing Domain](#domains_get) - **DELETE** [Delete a Domain](#domains_delete) ## GET List All Domains `/v2/domains` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: domain:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To retrieve a list of all of the domains in your account, send a GET request to `/v2/domains`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/domains` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } domains, _, err := client.Domains.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) domains = client.domains.all domains.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.domains.list() ``` #### Responses **200** The response will be a JSON object with a key called domains. The value of this will be an array of Domain objects, each of which contain the standard domain attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domains` array of object required Array of volumes. **Show child properties** `ip_address` string optional write-only Example: `192.0.2.1` This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. `name` string optional Example: `example.com` The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, `example.com` is a valid domain name. `ttl` integer optional read-only Nullable Example: `1800` This value is the time to live for the records on this domain, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `zone_file` string optional read-only Nullable This attribute contains the complete contents of the zone file for the selected domain. Individual domain record resources should be used to get more granular control over records. However, this attribute can also be used to get information about the SOA record, which is created automatically and is not accessible as an individual record resource. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domains": [ { "name": "example.com", "ttl": 1800, "zone_file": "$ORIGIN example.com.\n$TTL 1800\nexample.com. IN SOA ns1.digitalocean.com. hostmaster.example.com. 1415982609 10800 3600 604800 1800\nexample.com. 1800 IN NS ns1.digitalocean.com.\nexample.com. 1800 IN NS ns2.digitalocean.com.\nexample.com. 1800 IN NS ns3.digitalocean.com.\nexample.com. 1800 IN A 1.2.3.4\n" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Domain `/v2/domains` To create a new domain, send a POST request to `/v2/domains`. Set the "name" attribute to the domain name you are adding. Optionally, you may set the "ip_address" attribute, and an A record will be automatically created pointing to the apex domain. #### Request Body: `application/json` `ip_address` string optional write-only Example: `192.0.2.1` This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. `name` string optional Example: `example.com` The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, `example.com` is a valid domain name. `ttl` integer optional read-only Nullable Example: `1800` This value is the time to live for the records on this domain, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `zone_file` string optional read-only Nullable This attribute contains the complete contents of the zone file for the selected domain. Individual domain record resources should be used to get more granular control over records. However, this attribute can also be used to get information about the SOA record, which is created automatically and is not accessible as an individual record resource. ##### Request: `/v2/domains` ### Payload Content type `application/json` ```json { "name": "example.com" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"example.com","ip_address":"1.2.3.4"}' \ "https://api.digitalocean.com/v2/domains" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.DomainCreateRequest{ Name: "example.com", IPAddress: "1.2.3.4", } domain, _, err := client.Domains.Create(ctx, createRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) domain = DropletKit::Domain.new( name: 'example.com', ip_address: '1.2.3.4' ) client.domains.create(domain) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example.com" } resp = client.domains.create(body=req) ``` #### Responses **201** The response will be a JSON object with a key called domain. The value of this will be an object that contains the standard attributes associated with a domain. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain` object optional **Show child properties** `ip_address` string optional write-only Example: `192.0.2.1` This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. `name` string optional Example: `example.com` The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, `example.com` is a valid domain name. `ttl` integer optional read-only Nullable Example: `1800` This value is the time to live for the records on this domain, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `zone_file` string optional read-only Nullable This attribute contains the complete contents of the zone file for the selected domain. Individual domain record resources should be used to get more granular control over records. However, this attribute can also be used to get information about the SOA record, which is created automatically and is not accessible as an individual record resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "domain": { "name": "example.com", "ttl": 1800, "zone_file": null } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Domain `/v2/domains/{domain_name}` To get details about a specific domain, send a GET request to `/v2/domains/$DOMAIN_NAME`. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. ##### Request: `/v2/domains/{domain_name}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains/example.com" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() domain, _, err := client.Domains.Get(ctx, "example.com") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.domains.find(name: 'example.com') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.domains.get(domain_name="example.com") ``` #### Responses **200** The response will be a JSON object with a key called domain. The value of this will be an object that contains the standard attributes defined for a domain. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `domain` object optional **Show child properties** `ip_address` string optional write-only Example: `192.0.2.1` This optional attribute may contain an IP address. When provided, an A record will be automatically created pointing to the apex domain. `name` string optional Example: `example.com` The name of the domain itself. This should follow the standard domain format of domain.TLD. For instance, `example.com` is a valid domain name. `ttl` integer optional read-only Nullable Example: `1800` This value is the time to live for the records on this domain, in seconds. This defines the time frame that clients can cache queried information before a refresh should be requested. `zone_file` string optional read-only Nullable This attribute contains the complete contents of the zone file for the selected domain. Individual domain record resources should be used to get more granular control over records. However, this attribute can also be used to get information about the SOA record, which is created automatically and is not accessible as an individual record resource. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "domain": { "name": "example.com", "ttl": 1800, "zone_file": "$ORIGIN example.com.\n$TTL 1800\nexample.com. IN SOA ns1.digitalocean.com. hostmaster.example.com. 1415982611 10800 3600 604800 1800\nexample.com. 1800 IN NS ns1.digitalocean.com.\nexample.com. 1800 IN NS ns2.digitalocean.com.\nexample.com. 1800 IN NS ns3.digitalocean.com.\nexample.com. 1800 IN A 1.2.3.4\n" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Domain `/v2/domains/{domain_name}` To delete a domain, send a DELETE request to `/v2/domains/$DOMAIN_NAME`. #### Path Parameters `domain_name` string required Example: `example.com` The name of the domain itself. ##### Request: `/v2/domains/{domain_name}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/domains/example.com" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Domains.Delete(ctx, "example.com") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.domains.delete(name: 'example.com') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) delete_resp = client.domains.delete(domain_name="example.com") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Point to DigitalOcean Name Servers From Common Domain Registrars](https://docs.digitalocean.com/products/networking/dns/getting-started/dns-registrars/index.html.md), [How to Create, Edit, and Delete DNS Records](https://docs.digitalocean.com/products/networking/dns/how-to/manage-records/index.html.md), [How to Add Domains](https://docs.digitalocean.com/products/networking/dns/how-to/add-domains/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/droplet-actions/ --- title: Droplet Actions description: Droplet actions are tasks that can be executed on a Droplet. These can be things like rebooting, resizing, snapshotting, etc. Droplet action requests … product: Reference url: https://docs.digitalocean.com/reference/api/reference/droplet-actions/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Droplet Actions Generated on 4 Dec 2026 Droplet actions are tasks that can be executed on a Droplet. These can be things like rebooting, resizing, snapshotting, etc. Droplet action requests are generally targeted at one of the "actions" endpoints for a specific Droplet. The specific actions are usually initiated by sending a POST request with the action and arguments as parameters. Droplet action requests create a Droplet actions object, which can be used to get information about the status of an action. Creating a Droplet action is asynchronous: the HTTP call will return the action object before the action has finished processing on the Droplet. The current status of an action can be retrieved from either the Droplet actions endpoint or the global actions endpoint. If a Droplet action is uncompleted it may block the creation of a subsequent action for that Droplet, the locked attribute of the Droplet will be true and attempts to create a Droplet action will fail with a status of 422. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List Actions for a Droplet](#dropletActions_list) - **POST** [Initiate a Droplet Action](#dropletActions_post) - **POST** [Acting on Tagged Droplets](#dropletActions_post_byTag) - **GET** [Retrieve a Droplet Action](#dropletActions_get) ## GET List Actions for a Droplet `/v2/droplets/{droplet_id}/actions` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: droplet:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` 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. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/{droplet_id}/actions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/actions?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } actions, _, err := client.Droplets.Actions(ctx, 3164494, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) actions = client.droplets.actions(id: 3164494) actions.each ``` ### Python ```python 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) ``` #### Responses **200** A JSON object with an actions key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `actions` array of object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "actions": [ { "completed_at": "2020-07-20T19:37:45Z", "id": 982864273, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "image_transfer" ], "name": "New York 3", "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" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-07-20T19:37:30Z", "status": "completed", "type": "create" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Initiate a Droplet Action `/v2/droplets/{droplet_id}/actions` To initiate an action on a Droplet send a POST request to `/v2/droplets/$DROPLET_ID/actions`. In the JSON body to the request, set the `type` attribute to one of the supported action types: | Action | Details | Required Permissions | |---|---|---| | `enable_backups` | Enables backups for a Droplet | `droplet:update` | | `disable_backups` | Disables backups for a Droplet | `droplet:update` | | `change_backup_policy` | Update the backup policy for a Droplet | `droplet:update` | | `reboot` | Reboots a Droplet. A `reboot` action is an attempt to reboot the Droplet in a graceful way, similar to using the `reboot` command from the console. | `droplet:update` | | `power_cycle` | Power cycles a Droplet. A `powercycle` action is similar to pushing the reset button on a physical machine, it's similar to booting from scratch. | `droplet:update` | | `shutdown` | Shuts down a Droplet. A shutdown action is an attempt to shutdown the Droplet in a graceful way, similar to using the `shutdown` command from the console. Since a `shutdown` command can fail, this action guarantees that the command is issued, not that it succeeds. The preferred way to turn off a Droplet is to attempt a shutdown, with a reasonable timeout, followed by a `power_off` action to ensure the Droplet is off. | `droplet:update` | | `power_off` | Powers off a Droplet. A `power_off` event is a hard shutdown and should only be used if the `shutdown` action is not successful. It is similar to cutting the power on a server and could lead to complications. | `droplet:update` | | `power_on` | Powers on a Droplet. | `droplet:update` | | `restore` | Restore a Droplet using a backup image. The image ID that is passed in must be a backup of the current Droplet instance. The operation will leave any embedded SSH keys intact. | `droplet:update`, `droplet:admin` | | `password_reset` | Resets the root password for a Droplet. A new password will be provided via email. It must be changed after first use. | `droplet:update`, `droplet:admin` | | `resize` | Resizes a Droplet. Set the `size` attribute to a size slug. If a permanent resize with disk changes included is desired, set the `disk` attribute to `true`. | `droplet:update`, `droplet:create` | | `rebuild` | Rebuilds a Droplet from a new base image. Set the `image` attribute to an image ID or slug. | `droplet:update`, `droplet:admin` | | `rename` | Renames a Droplet. | `droplet:update` | | `change_kernel` | Changes a Droplet's kernel. Only applies to Droplets with externally managed kernels. All Droplets created after March 2017 use internal kernels by default. | `droplet:update` | | `enable_ipv6` | Enables IPv6 for a Droplet. Once enabled for a Droplet, IPv6 can not be disabled. **Warning:** The Droplet must be powered off before enabling IPv6 on an existing Droplet. When enabling IPv6 on an existing Droplet, [additional OS-level configuration](https://docs.digitalocean.com/products/networking/ipv6/how-to/enable/index.html.md#on-existing-droplets) is required. | `droplet:update` | | `snapshot` | Takes a snapshot of a Droplet. | `droplet:update`, `image:create` | #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Request Body: `application/json` The `type` attribute set in the request body will specify the action that will be taken on the Droplet. Some actions will require additional attributes to be set as well. **disable_backups** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **enable_ipv6** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **password_reset** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_cycle** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_off** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_on** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **reboot** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **shutdown** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **enable_backups** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `backup_policy` object optional **change_backup_policy** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `backup_policy` object optional **restore** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `image` integer optional Example: `12389723` The ID of a backup of the current Droplet instance to restore from. **resize** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `disk` boolean optional Example: `true` When `true`, the Droplet's disk will be resized in addition to its RAM and CPU. This is a permanent change and cannot be reversed as a Droplet's disk size cannot be decreased. `size` string optional Example: `s-2vcpu-2gb` The slug identifier for the size to which you wish to resize the Droplet. **rebuild** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `image` integer | string optional Example: `ubuntu-20-04-x64` The image ID of a public or private image or the slug identifier for a public image. The Droplet will be rebuilt using this image as its base. **rename** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `name` string optional Example: `nifty-new-name` The new name for the Droplet. **change_kernel** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `kernel` integer optional Example: `12389723` A unique number used to identify and reference a specific kernel. **snapshot** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `name` string optional Example: `Nifty New Snapshot` The name to give the new snapshot of the Droplet. ##### Request: `/v2/droplets/{droplet_id}/actions` ### Payload Content type `application/json` Example ```json { "backup_policy": { "day": "SUN", "hour": 20, "plan": "weekly" }, "type": "change_backup_policy" } ``` ```json { "kernel": 12389723, "type": "change_kernel" } ``` ```json { "type": "disable_backups" } ``` ```json { "backup_policy": { "hour": 20, "plan": "daily" }, "type": "enable_backups" } ``` ```json { "type": "enable_ipv6" } ``` ```json { "type": "password_reset" } ``` ```json { "type": "power_cycle" } ``` ```json { "type": "power_off" } ``` ```json { "type": "power_on" } ``` ```json { "type": "reboot" } ``` ```json { "image": "ubuntu-20-04-x64", "type": "rebuild" } ``` ```json { "name": "nifty-new-name", "type": "rename" } ``` ```json { "disk": true, "size": "s-2vcpu-2gb", "type": "resize" } ``` ```json { "image": 12389723, "type": "restore" } ``` ```json { "type": "shutdown" } ``` ```json { "name": "Nifty New Snapshot", "type": "snapshot" } ``` ### cURL ``` # Enable Backups curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"enable_backups"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Disable Backups curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"disable_backups"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Reboot a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"reboot"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Power cycle a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"power_cycle"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Shutdown and Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"shutdown"}' \ "https://api.digitalocean.com/v2/droplets/3067649/actions" # Power off a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"power_off"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Power on a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"power_on"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Restore a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"restore", "image": 12389723 }' \ "https://api.digitalocean.com/v2/droplets/3067649/actions" # Password Reset a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"password_reset"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Resize a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"resize","size":"1gb"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Rebuild a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"rebuild","image":"ubuntu-16-04-x64"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Rename a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"rename","name":"nifty-new-name"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Change the Kernel curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"change_kernel","kernel":991}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Enable IPv6 curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"enable_ipv6"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Enable Private Networking curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"enable_private_networking"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Snapshot a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"snapshot","name":"Nifty New Snapshot"}' \ "https://api.digitalocean.com/v2/droplets/3164450/actions" # Acting on Tagged Droplets curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"enable_backups"}' \ "https://api.digitalocean.com/v2/droplets/actions?tag_name=awesome" # Retrieve a Droplet Action curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164444/actions/36804807" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() // Enable Backups action, _, err := client.DropletActions.EnableBackups(ctx, 3164450) // Disable Backups // action, _, err := client.DropletActions.DisableBackups(ctx, 3164450) // Reboot a Droplet // action, _, err := client.DropletActions.Reboot(ctx, 3164450) // Power Cycle a Droplet // action, _, err := client.DropletActions.PowerCycle(ctx, 3164450) // Shutdown a Droplet // action, _, err := client.DropletActions.Shutdown(ctx, 3067649) // Power Off a Droplet // action, _, err := client.DropletActions.PowerOff(ctx, 3164450) // Power On a Droplet // action, _, err := client.DropletActions.PowerOn(ctx, 3164450) // Restore a Droplet // action, _, err := client.DropletActions.Restore(ctx, 3164449, 12389723) // Password Reset a Droplet // action, _, err := client.DropletActions.PasswordReset(ctx, 3164450) // Resize a Droplet // action, _, err := client.DropletActions.Resize(ctx, 3164450, "1gb", true) // Rebuild a Droplet // action, _, err := client.DropletActions.RebuildByImageSlug(ctx, 3164450, "ubuntu-16-04-x64") // Rename a Droplet // action, _, err := client.DropletActions.Rename(ctx, 3164450, "nifty-new-name") // Change the Kernel // action, _, err := client.DropletActions.ChangeKernel(ctx, 3164450, 991) // Enable IPv6 // action, _, err := client.DropletActions.EnableIPv6(ctx, 3164450) // Enable Private Networking // action, _, err := client.DropletActions.EnablePrivateNetworking(ctx, 3164450) // Snapshot a Droplet // action, _, err := client.DropletActions.Snapshot(ctx, 3164450, "Nifty New Snapshot") // Retrieve a Droplet Action // action, _, err := client.DropletActions.Get(ctx, 3164450, 36804807) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) # Enable Backups client.droplet_actions.enable_backups(droplet_id: 3164450) # Disable Backups # client.droplet_actions.disable_backups(droplet_id: 3164450) # Reboot a Droplet # client.droplet_actions.reboot(droplet_id: 3164450) # Power Cycle a Droplet # client.droplet_actions.power_cycle(droplet_id: 3164450) # Shutdown a Droplet # client.droplet_actions.shutdown(droplet_id: 3067649) # Power Off a Droplet # client.droplet_actions.power_off(droplet_id: 3164450) # Power On a Droplet # client.droplet_actions.power_on(droplet_id: 3164450) # Restore a Droplet # client.droplet_actions.restore(droplet_id: 3067649, image: 12389723) # Password Reset a Droplet # client.droplet_actions.password_reset(droplet_id: 3164450) # Resize a Droplet # client.droplet_actions.resize(droplet_id: 3164450, size: '1gb') # Rebuild a Droplet # client.droplet_actions.rebuild(droplet_id: 3164450, image: 'ubuntu-16-04-x64') # Rename a Droplet # client.droplet_actions.rename(droplet_id: 3164450, name: 'nifty-new-name') # Change the Kernel # client.droplet_actions.change_kernel(droplet_id: 3164450, kernel: 991) # Enable IPv6 # client.droplet_actions.enable_ipv6(droplet_id: 3164450) # Enable Private Networking # client.droplet_actions.enable_private_networking(droplet_id: 3164450) # Snapshot a Droplet # client.droplet_actions.snapshot(droplet_id: 3164450, name: 'Nifty New Snapshot') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) # enable back ups example req = { "type": "enable_backups" } resp = client.droplet_actions.post(droplet_id=346652, body=req) ``` #### Responses **201** The response will be a JSON object with a key called action. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "action": { "completed_at": "2020-11-14T16:30:06Z", "id": 36804636, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-11-14T16:29:21Z", "status": "completed", "type": "create" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Acting on Tagged Droplets `/v2/droplets/actions` Some actions can be performed in bulk on tagged Droplets. The actions can be initiated by sending a POST to `/v2/droplets/actions?tag_name=$TAG_NAME` with the action arguments. Only a sub-set of action types are supported: - `power_cycle` - `power_on` - `power_off` - `shutdown` - `enable_ipv6` (**Warning:** The Droplet must be powered off before enabling IPv6 on an existing Droplet.) - `enable_backups` - `disable_backups` - `snapshot` (also requires `image:create` permission) #### Query Parameters `tag_name` string optional Example: `env:prod` Used to filter Droplets by a specific tag. Can not be combined with `name` or `type`. Requires `tag:read` scope. #### Request Body: `application/json` The `type` attribute set in the request body will specify the action that will be taken on the Droplet. Some actions will require additional attributes to be set as well. **disable_backups** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **enable_backups** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **enable_ipv6** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_cycle** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_off** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **power_on** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **shutdown** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. **snapshot** `type` string (enum) required Example: `reboot` The type of action to initiate for the Droplet. `name` string optional Example: `Nifty New Snapshot` The name to give the new snapshot of the Droplet. ##### Request: `/v2/droplets/actions` ### Payload Content type `application/json` Example ```json { "type": "disable_backups" } ``` ```json { "type": "enable_backups" } ``` ```json { "type": "enable_ipv6" } ``` ```json { "type": "power_cycle" } ``` ```json { "type": "power_off" } ``` ```json { "type": "power_on" } ``` ```json { "type": "shutdown" } ``` ```json { "name": "Nifty New Snapshot", "type": "snapshot" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"enable_backups"}' \ "https://api.digitalocean.com/v2/droplets/actions?tag_name=awesome" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() action, _, err := client.DropletActions.PowerOffByTag(ctx, "awesome") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.droplet_actions.power_off_for_tag(tag: 'awesome') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "type": "enable_backups" } resp = client.droplet_actions.post_by_tag(tag_name="production",body=req) ``` #### Responses **201** The response will be a JSON object with a key called actions. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `actions` array of object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "actions": [ { "completed_at": "2020-11-14T16:30:06Z", "id": 36804636, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-11-14T16:29:21Z", "status": "completed", "type": "create" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve a Droplet Action `/v2/droplets/{droplet_id}/actions/{action_id}` To retrieve a Droplet action, send a GET request to `/v2/droplets/$DROPLET_ID/actions/$ACTION_ID`. The response will be a JSON object with a key called `action`. The value will be a Droplet action object. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. `action_id` integer >= 1 required Example: `36804636` A unique numeric ID that can be used to identify and reference an action. ##### Request: `/v2/droplets/{droplet_id}/actions/{action_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164444/actions/36804807" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() action, _, err := client.DropletActions.Get(ctx, 3164450, 36804807) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.droplet_actions.find(droplet_id: 3164444, id: 36804807) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplet_actions.get(droplet_id=3934132, action_id=2432342) ``` #### Responses **200** The result will be a JSON object with an action key. This will be set to an action object containing the standard action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "action": { "completed_at": "2020-11-14T16:30:06Z", "id": 36804636, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 3164444, "resource_type": "droplet", "started_at": "2020-11-14T16:29:21Z", "status": "completed", "type": "create" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Connect to Droplets with the Droplet Console](https://docs.digitalocean.com/products/droplets/how-to/connect-with-console/index.html.md), [How to Create a Droplet](https://docs.digitalocean.com/products/droplets/how-to/create/index.html.md), [Droplet Pricing](https://docs.digitalocean.com/products/droplets/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/droplet-autoscale-pools/ --- title: Droplet Autoscale Pools description: Droplet autoscale pools manage automatic horizontal scaling for your applications based on resource usage (CPU, memory, or both) or a static … product: Reference url: https://docs.digitalocean.com/reference/api/reference/droplet-autoscale-pools/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Droplet Autoscale Pools Generated on 4 Dec 2026 Droplet autoscale pools manage automatic horizontal scaling for your applications based on resource usage (CPU, memory, or both) or a static configuration. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Autoscale Pools](#autoscalepools_list) - **POST** [Create a New Autoscale Pool](#autoscalepools_create) - **GET** [Retrieve an Existing Autoscale Pool](#autoscalepools_get) - **PUT** [Update Autoscale Pool](#autoscalepools_update) - **DELETE** [Delete autoscale pool](#autoscalepools_delete) - **DELETE** [Delete autoscale pool and resources](#autoscalepools_delete_dangerous) - **GET** [List members](#autoscalepools_list_members) - **GET** [List history events](#autoscalepools_list_history) ## GET List All Autoscale Pools `/v2/droplets/autoscale` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: droplet:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all autoscale pools in your team, send a GET request to `/v2/droplets/autoscale`. The response body will be a JSON object with a key of `autoscale_pools` containing an array of autoscale pool objects. These each contain the standard autoscale pool attributes. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `name` string optional Example: `my-autoscale-pool` The name of the autoscale pool ##### Request: `/v2/droplets/autoscale` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/autoscale?page=1&per_page=1" ``` #### Responses **200** A JSON object with a key of autoscale_pools. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `autoscale_pools` array of object optional **Show child properties** `active_resources_count` integer required Example: `1` The number of active Droplets in the autoscale pool. `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. `current_utilization` object optional **Show child properties** `cpu` number (float) optional Example: `0.0007338008770232183` The average CPU utilization of the autoscale pool. `memory` number (float) optional Example: `0.3588531587713522` The average memory utilization of the autoscale pool. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. `name` string required Example: `my-autoscale-pool` The human-readable name set for the autoscale pool. `status` string, one of: active, deleting, error required Example: `active` The current status of the autoscale pool. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "autoscale_pools": [ { "active_resources_count": 1, "config": { "cooldown_minutes": 10, "max_instances": 5, "min_instances": 1, "target_cpu_utilization": 0.5 }, "created_at": "2020-11-19T20:27:18Z", "current_utilization": { "cpu": 0.0007338008770232183, "memory": 0.3588531587713522 }, "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } ], "links": { "pages": null }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Autoscale Pool `/v2/droplets/autoscale` To create a new autoscale pool, send a POST request to `/v2/droplets/autoscale` setting the required attributes. The response body will contain a JSON object with a key called `autoscale_pool` containing the standard attributes for the new autoscale pool. #### Request Body: `application/json` `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `name` string required Example: `my-autoscale-pool` The human-readable name of the autoscale pool. This field cannot be updated ##### Request: `/v2/droplets/autoscale` ### Payload Content type `application/json` Example ```json { "config": { "cooldown_minutes": 10, "max_instances": 5, "min_instances": 1, "target_cpu_utilization": 0.5 }, "droplet_template": { "backups": true, "image": "ubuntu-20-04-x64", "ipv6": true, "monitoring": true, "name": "example.com", "region": "nyc3", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, "name": "my-autoscale-pool" } ``` ```json { "config": { "target_number_instances": 2 }, "droplet_template": { "backups": true, "image": "ubuntu-20-04-x64", "ipv6": true, "monitoring": true, "name": "example.com", "region": "nyc3", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, "name": "my-autoscale-pool" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{ "name": "test-autoscalergroup", "config": { "min_instances": 1, "max_instances": 5, "target_cpu_utilization": 0.5, "cooldown_minutes": 5 }, "droplet_template": { "size": "c-2", "region": "tor1", "image": "ubuntu-20-04-x64", "tags": [ "test-ag-01" ], "ssh_keys": [ "392594", "385255" ], "vpc_uuid": "c472520a-831e-4770-8135-542c57a69daa", "ipv6": true, "user_data": "\n#cloud-config\nruncmd:\n- apt-get update\n" } }' \ "https://api.digitalocean.com/v2/droplets/autoscale" ``` #### Responses **202** Accepted Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `autoscale_pool` object optional **Show child properties** `active_resources_count` integer required Example: `1` The number of active Droplets in the autoscale pool. `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. `current_utilization` object optional **Show child properties** `cpu` number (float) optional Example: `0.0007338008770232183` The average CPU utilization of the autoscale pool. `memory` number (float) optional Example: `0.3588531587713522` The average memory utilization of the autoscale pool. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. `name` string required Example: `my-autoscale-pool` The human-readable name set for the autoscale pool. `status` string, one of: active, deleting, error required Example: `active` The current status of the autoscale pool. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** Example ```json { "autoscale_pool": { "active_resources_count": 1, "config": { "cooldown_minutes": 10, "max_instances": 5, "min_instances": 1, "target_cpu_utilization": 0.5 }, "created_at": "2020-11-19T20:27:18Z", "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } } ``` ```json { "autoscale_pool": { "active_resources_count": 1, "config": { "target_number_instances": 1 }, "created_at": "2020-11-19T20:27:18Z", "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Autoscale Pool `/v2/droplets/autoscale/{autoscale_pool_id}` To show information about an individual autoscale pool, send a GET request to `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID`. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/autoscale/880fee37-d07a-4f94-94a0-f07d9fc7bbb4" ``` #### Responses **200** The response will be a JSON object with a key called autoscale_pool. This will be set to a JSON object that contains the standard autoscale pool attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `autoscale_pool` object optional **Show child properties** `active_resources_count` integer required Example: `1` The number of active Droplets in the autoscale pool. `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. `current_utilization` object optional **Show child properties** `cpu` number (float) optional Example: `0.0007338008770232183` The average CPU utilization of the autoscale pool. `memory` number (float) optional Example: `0.3588531587713522` The average memory utilization of the autoscale pool. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. `name` string required Example: `my-autoscale-pool` The human-readable name set for the autoscale pool. `status` string, one of: active, deleting, error required Example: `active` The current status of the autoscale pool. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "autoscale_pool": { "active_resources_count": 1, "config": { "cooldown_minutes": 10, "max_instances": 5, "min_instances": 1, "target_cpu_utilization": 0.5 }, "created_at": "2020-11-19T20:27:18Z", "current_utilization": { "cpu": 0.0007338008770232183, "memory": 0.3588531587713522 }, "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Autoscale Pool `/v2/droplets/autoscale/{autoscale_pool_id}` To update the configuration of an existing autoscale pool, send a PUT request to `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID`. The request must contain a full representation of the autoscale pool including existing attributes. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. #### Request Body: `application/json` `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `name` string required Example: `my-autoscale-pool` The human-readable name of the autoscale pool. This field cannot be updated ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}` ### Payload Content type `application/json` ```json { "config": { "target_number_instances": 2 }, "droplet_template": { "backups": true, "image": "ubuntu-20-04-x64", "ipv6": true, "monitoring": true, "name": "example.com", "region": "nyc3", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, "name": "my-autoscale-pool" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{ "name": "test-autoscalergroup-01", "config": { "min_instances": 1, "max_instances": 5, "target_cpu_utilization": 0.5, "cooldown_minutes": 10 }, "droplet_template": { "size": "c-2", "region": "tor1", "image": "ubuntu-20-04-x64", "tags": [ "test-ag-01" ], "ssh_keys": [ "372862", "367582", "355790" ], "vpc_uuid": "4637280e-3842-4661-a628-a6f0392959d3", "with_droplet_agent": true, "ipv6": true, "user_data": "\n#cloud-config\nruncmd:\n- apt-get update\n" } }' \ "https://api.digitalocean.com/v2/droplets/autoscale/d0067f19-c9bd-4d8c-b28b-e464fd1fb250" ``` #### Responses **200** Accepted Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `autoscale_pool` object optional **Show child properties** `active_resources_count` integer required Example: `1` The number of active Droplets in the autoscale pool. `config` object required The scaling configuration for an autoscale pool, which is how the pool scales up and down (either by resource utilization or static configuration). One of: **Autoscale Pool Static Config** `target_number_instances` integer required Example: `3` Fixed number of instances in an autoscale pool. **Autoscale Pool Dynamic Config** `cooldown_minutes` integer optional Example: `5` The number of minutes to wait between scaling events in an autoscale pool. Defaults to 10 minutes. `max_instances` integer required Example: `10` The maximum number of Droplets in an autoscale pool. `min_instances` integer required Example: `5` The minimum number of Droplets in an autoscale pool. `target_cpu_utilization` number (float) optional Example: `0.6` Target CPU utilization as a decimal. `target_memory_utilization` number (float) optional Example: `0.6` Target memory utilization as a decimal. `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was created. `current_utilization` object optional **Show child properties** `cpu` number (float) optional Example: `0.0007338008770232183` The average CPU utilization of the autoscale pool. `memory` number (float) optional Example: `0.3588531587713522` The average memory utilization of the autoscale pool. `droplet_template` object required **Show child properties** `image` string required Example: `ubuntu-20-04-x64` The Droplet image to be used for all Droplets in the autoscale pool. You may specify the slug or the image ID. `ipv6` boolean optional Example: `true` Assigns a unique IPv6 address to each of the Droplets in the autoscale pool. `name` string optional Example: `my-droplet-name` The name(s) to be applied to all Droplets in the autoscale pool. `project_id` string optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The project that the Droplets in the autoscale pool will belong to. Requires `project:read` scope. `public_networking` boolean optional Example: `true` An optional boolean indicating whether the Droplets should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string (enum) required Example: `tor1` The datacenter in which all of the Droplets will be created. `size` string required Example: `c-2` The Droplet size to be used for all Droplets in the autoscale pool. `ssh_keys` array of string required Example: `["88:66:90:d2:68:d5:b5:85:e3:26:26:11:31:57:e6:f8"]` The SSH keys to be installed on the Droplets in the autoscale pool. You can either specify the key ID or the fingerprint. Requires `ssh_key:read` scope. `tags` array of string optional Example: `["my-tag"]` The tags to apply to each of the Droplets in the autoscale pool. Requires `tag:read` scope. `user_data` string optional A string containing user data that cloud-init consumes to configure a Droplet on first boot. User data is often a cloud-config file or Bash script. It must be plain text and may not exceed 64 KiB in size. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` The VPC where the Droplets in the autoscale pool will be created. The VPC must be in the region where you want to create the Droplets. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` Installs the Droplet agent. This must be set to true to monitor Droplets for resource utilization scaling. `id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for each autoscale pool instance. This is automatically generated upon autoscale pool creation. `name` string required Example: `my-autoscale-pool` The human-readable name set for the autoscale pool. `status` string, one of: active, deleting, error required Example: `active` The current status of the autoscale pool. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` A time value given in ISO8601 combined date and time format that represents when the autoscale pool was last updated. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "autoscale_pool": { "active_resources_count": 1, "config": { "cooldown_minutes": 10, "max_instances": 5, "min_instances": 1, "target_cpu_utilization": 0.5 }, "created_at": "2020-11-19T20:27:18Z", "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } } ``` ```json { "autoscale_pool": { "active_resources_count": 1, "config": { "target_number_instances": 1 }, "created_at": "2020-11-19T20:27:18Z", "droplet_template": { "image": "ubuntu-20-04-x64", "ipv6": true, "name": "droplet-name", "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "public_networking": true, "region": "tor1", "size": "c-2", "ssh_keys": [ "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "tags": [ "my-tag" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "with_droplet_agent": true }, "id": "0d3db13e-a604-4944-9827-7ec2642d32ac", "name": "test-autoscaler-group-01", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete autoscale pool `/v2/droplets/autoscale/{autoscale_pool_id}` To destroy an autoscale pool, send a DELETE request to the `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID` endpoint. A successful response will include a 202 response code and no content. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/autoscale/880fee37-d07a-4f94-94a0-f07d9fc7bbb4" ``` #### Responses **202** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete autoscale pool and resources `/v2/droplets/autoscale/{autoscale_pool_id}/dangerous` To destroy an autoscale pool and its associated resources (Droplets), send a DELETE request to the `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID/dangerous` endpoint. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. #### Header Parameters `X-Dangerous` boolean required Example: `true` Acknowledge this action will destroy the autoscale pool and its associated resources and *can not* be reversed. ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}/dangerous` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "X-Dangerous: true" \ "https://api.digitalocean.com/v2/droplets/autoscale/880fee37-d07a-4f94-94a0-f07d9fc7bbb4/dangerous" ``` #### Responses **202** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List members `/v2/droplets/autoscale/{autoscale_pool_id}/members` To list the Droplets in an autoscale pool, send a GET request to `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID/members`. The response body will be a JSON object with a key of `droplets`. This will be set to an array containing information about each of the Droplets in the autoscale pool. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}/members` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/autoscale/d0067f19-c9bd-4d8c-b28b-e464fd1fb250/members" ``` #### Responses **200** A JSON object with a key of droplets. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `droplets` array of object optional **Show child properties** `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` The creation time of the Droplet in ISO8601 combined date and time format. `current_utilization` object required **Show child properties** `cpu` number (float) optional Example: `0.0007338008770232183` The CPU utilization average of the individual Droplet. `memory` number (float) optional Example: `0.3588531587713522` The memory utilization average of the individual Droplet. `droplet_id` integer required Example: `459903570` The unique identifier of the Droplet. `health_status` string, one of: healthy, unhealthy required Example: `healthy` The health status of the Droplet. `status` string, one of: provisioning, active, deleting, off required Example: `active` The power status of the Droplet. `unhealthy_reason` string optional Example: `Droplet failed health check` A human-readable description of why the Droplet is unhealthy. Only present when `health_status` is `unhealthy`. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` The last updated time of the Droplet in ISO8601 combined date and time format. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "droplets": [ { "created_at": "2020-11-19T20:27:18Z", "current_utilization": { "cpu": 0.0007338008770232183, "memory": 0.3588531587713522 }, "droplet_id": 123456, "health_status": "healthy", "status": "active", "updated_at": "2020-12-01T00:42:16Z" } ], "links": { "pages": null }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List history events `/v2/droplets/autoscale/{autoscale_pool_id}/history` To list all of the scaling history events of an autoscale pool, send a GET request to `/v2/droplets/autoscale/$AUTOSCALE_POOL_ID/history`. The response body will be a JSON object with a key of `history`. This will be set to an array containing objects each representing a history event. #### Path Parameters `autoscale_pool_id` string required Example: `0d3db13e-a604-4944-9827-7ec2642d32ac` A unique identifier for an autoscale pool. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/autoscale/{autoscale_pool_id}/history` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/autoscale/07445b1b-1dc1-414d-b0a7-239ac66a9148/history" ``` #### Responses **200** A JSON object with a key of history. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `history` array of object optional **Show child properties** `created_at` string (date-time) required Example: `2020-07-28T18:00:00Z` The creation time of the history event in ISO8601 combined date and time format. `current_instance_count` integer required Example: `2` The current number of Droplets in the autoscale pool. `desired_instance_count` integer required Example: `2` The target number of Droplets for the autoscale pool after the scaling event. `history_event_id` string required Example: `01936530-4471-7b86-9634-32d8fcfecbc6` The unique identifier of the history event. `reason` string, one of: CONFIGURATION_CHANGE, SCALE_UP, SCALE_DOWN required Example: `CONFIGURATION_CHANGE` The reason for the scaling event. `status` string, one of: in_progress, success, error required Example: `success` The status of the scaling event. `updated_at` string (date-time) required Example: `2020-07-28T18:00:00Z` The last updated time of the history event in ISO8601 combined date and time format. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "history": [ { "created_at": "2020-11-19T20:27:18Z", "current_instance_count": 2, "desired_instance_count": 2, "history_event_id": "01936530-4471-7b86-9634-32d8fcfecbc6", "reason": "CONFIGURATION_CHANGE", "status": "success", "updated_at": "2020-12-01T00:42:16Z" } ], "links": { "pages": null }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Connect to Droplets with the Droplet Console](https://docs.digitalocean.com/products/droplets/how-to/connect-with-console/index.html.md), [How to Create a Droplet](https://docs.digitalocean.com/products/droplets/how-to/create/index.html.md), [Droplet Pricing](https://docs.digitalocean.com/products/droplets/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/droplets/ --- title: Droplets description: A [Droplet](https://docs.digitalocean.com/products/droplets/) is a DigitalOcean virtual machine. By sending requests to the Droplet endpoint, you can … product: Reference url: https://docs.digitalocean.com/reference/api/reference/droplets/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Droplets Generated on 4 Dec 2026 A [Droplet](https://docs.digitalocean.com/products/droplets/index.html.md) is a DigitalOcean virtual machine. By sending requests to the Droplet endpoint, you can list, create, or delete Droplets. Some of the attributes will have an object value. The `region` and `image` objects will all contain the standard attributes of their associated types. Find more information about each of these objects in their respective sections. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Droplets](#droplets_list) - **POST** [Create a New Droplet](#droplets_create) - **DELETE** [Deleting Droplets by Tag](#droplets_destroy_byTag) - **GET** [Retrieve an Existing Droplet](#droplets_get) - **DELETE** [Delete an Existing Droplet](#droplets_destroy) - **GET** [List Backups for a Droplet](#droplets_list_backups) - **GET** [Retrieve the Backup Policy for an Existing Droplet](#droplets_get_backup_policy) - **GET** [List Backup Policies for All Existing Droplets](#droplets_list_backup_policies) - **GET** [List Supported Droplet Backup Policies](#droplets_list_supported_backup_policies) - **GET** [List Snapshots for a Droplet](#droplets_list_snapshots) - **GET** [List All Available Kernels for a Droplet](#droplets_list_kernels) - **GET** [List all Firewalls Applied to a Droplet](#droplets_list_firewalls) - **GET** [List Neighbors for a Droplet](#droplets_list_neighbors) - **GET** [List Associated Resources for a Droplet](#droplets_list_associatedResources) - **DELETE** [Selectively Destroy a Droplet and its Associated Resources](#droplets_destroy_withAssociatedResourcesSelective) - **DELETE** [Destroy a Droplet and All of its Associated Resources (Dangerous)](#droplets_destroy_withAssociatedResourcesDangerous) - **GET** [Check Status of a Droplet Destroy with Associated Resources Request](#droplets_get_DestroyAssociatedResourcesStatus) - **POST** [Retry a Droplet Destroy with Associated Resources Request](#droplets_destroy_retryWithAssociatedResources) - **GET** [List All Droplet Neighbors](#droplets_list_neighborsIds) ## GET List All Droplets `/v2/droplets` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: droplet:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all Droplets in your account, send a GET request to `/v2/droplets`. The response body will be a JSON object with a key of `droplets`. This will be set to an array containing objects each representing a Droplet. These will contain the standard Droplet attributes. ### Filtering Results by Tag It's possible to request filtered results by including certain query parameters. To only list Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your GET request. For example, `/v2/droplets?tag_name=$TAG_NAME`. ### GPU Droplets By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the `type` query parameter to `gpus`. For example, `/v2/droplets?type=gpus`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `tag_name` string optional Example: `env:prod` Used to filter Droplets by a specific tag. Can not be combined with `name` or `type`. Requires `tag:read` scope. `name` string optional Example: `web-01` Used to filter list response by Droplet name returning only exact matches. It is case-insensitive and can not be combined with `tag_name`. `type` string, one of: droplets, gpus optional Example: `droplets` When `type` is set to `gpus`, only GPU Droplets will be returned. By default, only non-GPU Droplets are returned. Can not be combined with `tag_name`. ##### Request: `/v2/droplets` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } droplets, _, err := client.Droplets.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) droplets = client.droplets.all droplets.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list() ``` #### Responses **200** A JSON object with a key of droplets. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `droplets` array of object optional **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional **Show child properties** `amount` integer optional Example: `25` The amount of space allocated to the disk. `unit` string optional Example: `gib` The unit of measure for the disk size. `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional **Show child properties** `amount` integer optional Example: `25` The amount of VRAM allocated to the GPU. `unit` string optional Example: `gib` The unit of measure for the VRAM. `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional **Show child properties** `gateway` string optional Example: `104.236.0.1` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. `ip_address` string (ipv4) optional Example: `104.236.32.182` The IP address of the IPv4 network interface. `netmask` string (ipv4) optional Example: `255.255.192.0` The netmask of the IPv4 network interface. `type` string, one of: public, private optional Example: `public` The type of the IPv4 network interface. `v6` array of object optional **Show child properties** `gateway` string (ipv6) optional Example: `2604:a880:0:1010::1` The gateway of the specified IPv6 network interface. `ip_address` string (ipv6) optional Example: `2604:a880:0:1010::18a:a001` The IP address of the IPv6 network interface. `netmask` integer optional Example: `64` The netmask of the IPv6 network interface. `type` string, one of: public optional Example: `public` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "droplets": [ { "backup_ids": [ 53893572 ], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.124", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.165.1", "ip_address": "192.241.165.154", "netmask": "255.255.255.0", "type": "public" } ], "v6": [ { "gateway": "2604:a880:0:1010::1", "ip_address": "2604:a880:0:1010::18a:a001", "netmask": 64, "type": "public" } ] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [ 67512819 ], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, { "backup_ids": [], "created_at": "2020-07-21T18:42:27Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "private_networking" ], "id": 3164459, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "assets.example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.138", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "162.243.0.1", "ip_address": "162.243.0.4", "netmask": "255.255.255.0", "type": "public" } ], "v6": [] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "storage", "env:prod" ], "vcpus": 1, "volume_ids": [ "506f78a4-e098-11e5-ad9f-000f53306ae1" ], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, { "backup_ids": [], "created_at": "2020-07-21T18:32:55Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "private_networking" ], "id": 3164412, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "stage.example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.125", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.247.1", "ip_address": "192.241.247.248", "netmask": "255.255.255.0", "type": "public" } ], "v6": [] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "active", "subnet_uuid": "0f1a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8", "tags": [ "env:stage" ], "vcpus": 1, "volume_ids": [ "7724db7c-e098-11e5-b522-000f53304e51" ], "vpc_uuid": "5a4981aa-9653-4bd1-bef5-d6bff52042e4" } ], "links": { "pages": {} }, "meta": { "total": 3 } } ``` ```json { "droplets": [ { "backup_ids": [ 53893572 ], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.124", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.165.1", "ip_address": "192.241.165.154", "netmask": "255.255.255.0", "type": "public" } ], "v6": [ { "gateway": "2604:a880:0:1010::1", "ip_address": "2604:a880:0:1010::18a:a001", "netmask": 64, "type": "public" } ] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [ 67512819 ], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, { "backup_ids": [], "created_at": "2020-07-21T18:42:27Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "private_networking" ], "id": 3164459, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "assets.example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.138", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "162.243.0.1", "ip_address": "162.243.0.4", "netmask": "255.255.255.0", "type": "public" } ], "v6": [] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "storage", "env:prod" ], "vcpus": 1, "volume_ids": [ "506f78a4-e098-11e5-ad9f-000f53306ae1" ], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" } ], "links": { "pages": {} }, "meta": { "total": 2 } } ``` ```json { "droplets": [ { "backup_ids": [], "created_at": "2024-09-30T15:23:36Z", "disk": 720, "disk_info": [ { "size": { "amount": 720, "unit": "gib" }, "type": "local" }, { "size": { "amount": 5120, "unit": "gib" }, "type": "scratch" } ], "features": [ "droplet_agent", "private_networking" ], "gpu_info": { "count": 1, "model": "nvidia_h100", "vram": { "amount": 80, "unit": "gib" } }, "id": 448543583, "image": { "created_at": "2024-09-27T15:35:19Z", "description": "GPU H100 1x Base Image", "distribution": "Ubuntu", "id": 166407044, "min_disk_size": 25, "name": "AI/ML Ready H100x1", "public": true, "regions": [ "nyc3", "nyc1", "sfo1", "nyc2", "ams2", "sgp1", "lon1", "ams3", "fra1", "tor1", "sfo2", "blr1", "sfo3", "syd1" ], "size_gigabytes": 18.47, "slug": "gpu-h100x1-base", "status": "available", "tags": [], "type": "base" }, "kernel": null, "locked": false, "memory": 245760, "name": "ml-ai-ubuntu-gpu-h100x1-80gb-tor1", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.124", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.165.1", "ip_address": "192.241.165.154", "netmask": "255.255.255.0", "type": "public" } ], "v6": [] }, "next_backup_window": null, "region": { "available": true, "features": [ "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer", "server_id", "management_networking" ], "name": "Toronto 1", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g", "gpu-h100x1-80gb", "gpu-h100x8-640gb" ], "slug": "tor1" }, "size": { "available": true, "description": "H100 GPU - 1X", "disk": 720, "disk_info": [ { "size": { "amount": 720, "unit": "gib" }, "type": "local" }, { "size": { "amount": 5120, "unit": "gib" }, "type": "scratch" } ], "gpu_info": { "count": 1, "model": "nvidia_h100", "vram": { "amount": 80, "unit": "gib" } }, "memory": 245760, "price_hourly": 6.74, "price_monthly": 4529.3, "regions": [ "tor1" ], "slug": "gpu-h100x1-80gb", "transfer": 15, "vcpus": 20 }, "size_slug": "gpu-h100x1-80gb", "snapshot_ids": [], "status": "active", "subnet_uuid": "b7c8d9e0-1f2a-3b4c-5d6e-7f8091a2b3c4", "tags": [], "vcpus": 20, "volume_ids": [], "vpc_uuid": "e2fdd15c-6ae6-4c11-8c5d-72dae2ba1ad1" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Droplet `/v2/droplets` To create a new Droplet, send a POST request to `/v2/droplets` setting the required attributes. A Droplet will be created using the provided information. The response body will contain a JSON object with a key called `droplet`. The value will be an object containing the standard attributes for your new Droplet. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing. The `actions` returned as part of the response's `links` object can be used to check the status of the Droplet create event. ### Create Multiple Droplets Creating multiple Droplets is very similar to creating a single Droplet. Instead of sending `name` as a string, send `names` as an array of strings. A Droplet will be created for each name you send using the associated information. Up to ten Droplets may be created this way at a time. Rather than returning a single Droplet, the response body will contain a JSON array with a key called `droplets`. This will be set to an array of JSON objects, each of which will contain the standard Droplet attributes. The response code, 202 Accepted, does not indicate the success or failure of any operation, just that the request has been accepted for processing. The array of `actions` returned as part of the response's `links` object can be used to check the status of each individual Droplet create event. #### Request Body: `application/json` **Single Droplet Request** `name` string required Example: `example.com` The human-readable string you wish to use when displaying the Droplet name. The name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. The name set during creation will also determine the hostname for the Droplet in its internal configuration. `backup_policy` object optional `backups` boolean optional Example: `true` A boolean indicating whether automated backups should be enabled for the Droplet. `image` integer | string required Example: `ubuntu-20-04-x64` The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet. Requires `image:read` scope. `ipv6` boolean optional Example: `true` A boolean indicating whether to enable IPv6 on the Droplet. `monitoring` boolean optional Example: `true` A boolean indicating whether to install the DigitalOcean agent for monitoring. `private_networking` boolean optional Deprecated Example: `true` This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. `public_networking` boolean optional Example: `true` An optional boolean indicating whether this Droplet should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string optional Example: `nyc3` The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g. `nyc`) can be used to deploy the Droplet in any of the that region's locations (`nyc1`, `nyc2`, or `nyc3`). If the region is omitted from the create request completely, the Droplet may deploy in any region. `size` string required Example: `s-1vcpu-1gb` The slug identifier for the size that you wish to select for this Droplet. `ssh_keys` array of anyOf optional Example: `[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"]` An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. You must add the keys to your team before they can be embedded on a Droplet. Requires `ssh_key:read` scope. `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` An optional string specifying the UUID of the VPC subnet to which the Droplet will be assigned. If excluded, the Droplet will be assigned to a default subnet of the VPC. Requires `vpc:read` scope. `tags` array of string optional Nullable Example: `["env:prod","web"]` A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags. Requires `tag:create` scope. `user_data` string optional A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size. `volumes` array of string optional Example: `["12e97116-7280-11ed-b3d0-0a58ac146812"]` An array of IDs for block storage volumes that will be attached to the Droplet once created. The volumes must not already be attached to an existing Droplet. Requires `block_storage:read` scpoe. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to `false`. To make installation errors fatal, explicitly set it to `true`. **Multiple Droplet Request** `names` array of string required Example: `["sub-01.example.com","sub-02.example.com"]` An array of human human-readable strings you wish to use when displaying the Droplet name. Each name, if set to a domain name managed in the DigitalOcean DNS management system, will configure a PTR record for the Droplet. Each name set during creation will also determine the hostname for the Droplet in its internal configuration. `backup_policy` object optional `backups` boolean optional Example: `true` A boolean indicating whether automated backups should be enabled for the Droplet. `image` integer | string required Example: `ubuntu-20-04-x64` The image ID of a public or private image or the slug identifier for a public image. This image will be the base image for your Droplet. Requires `image:read` scope. `ipv6` boolean optional Example: `true` A boolean indicating whether to enable IPv6 on the Droplet. `monitoring` boolean optional Example: `true` A boolean indicating whether to install the DigitalOcean agent for monitoring. `private_networking` boolean optional Deprecated Example: `true` This parameter has been deprecated. Use `vpc_uuid` instead to specify a VPC network for the Droplet. If no `vpc_uuid` is provided, the Droplet will be placed in your account's default VPC for the region. `public_networking` boolean optional Example: `true` An optional boolean indicating whether this Droplet should be created with public networking or not. By default, all Droplets are created with public networking available. If explicitly set to `false`, only private networking will be enabled, and public networking will be disabled; currently this means that it will not have any public static or Reserved IPv4 or IPv6 address, nor can one be assigned later. If explicitly set to `false`, `ipv6` must also be `false`. `region` string optional Example: `nyc3` The slug identifier for the region that you wish to deploy the Droplet in. If the specific datacenter is not not important, a slug prefix (e.g. `nyc`) can be used to deploy the Droplet in any of the that region's locations (`nyc1`, `nyc2`, or `nyc3`). If the region is omitted from the create request completely, the Droplet may deploy in any region. `size` string required Example: `s-1vcpu-1gb` The slug identifier for the size that you wish to select for this Droplet. `ssh_keys` array of anyOf optional Example: `[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"]` An array containing the IDs or fingerprints of the SSH keys that you wish to embed in the Droplet's root account upon creation. You must add the keys to your team before they can be embedded on a Droplet. Requires `ssh_key:read` scope. `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` An optional string specifying the UUID of the VPC subnet to which the Droplet will be assigned. If excluded, the Droplet will be assigned to a default subnet of the VPC. Requires `vpc:read` scope. `tags` array of string optional Nullable Example: `["env:prod","web"]` A flat array of tag names as strings to apply to the Droplet after it is created. Tag names can either be existing or new tags. Requires `tag:create` scope. `user_data` string optional A string containing 'user data' which may be used to configure the Droplet on first boot, often a 'cloud-config' file or Bash script. It must be plain text and may not exceed 64 KiB in size. `volumes` array of string optional Example: `["12e97116-7280-11ed-b3d0-0a58ac146812"]` An array of IDs for block storage volumes that will be attached to the Droplet once created. The volumes must not already be attached to an existing Droplet. Requires `block_storage:read` scpoe. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet will be assigned. If excluded, the Droplet will be assigned to your account's default VPC for the region. Requires `vpc:read` scope. `with_droplet_agent` boolean optional Example: `true` A boolean indicating whether to install the DigitalOcean agent used for providing access to the Droplet web console in the control panel. By default, the agent is installed on new Droplets but installation errors (i.e. OS not supported) are ignored. To prevent it from being installed, set to `false`. To make installation errors fatal, explicitly set it to `true`. ##### Request: `/v2/droplets` ### Payload Content type `application/json` Example ```json { "backups": true, "image": "ubuntu-20-04-x64", "ipv6": true, "monitoring": true, "name": "example.com", "region": "nyc3", "size": "s-1vcpu-1gb", "ssh_keys": [ 289794, "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" } ``` ```json { "backups": true, "image": "ubuntu-20-04-x64", "ipv6": true, "monitoring": true, "names": [ "sub-01.example.com", "sub-02.example.com" ], "region": "nyc3", "size": "s-1vcpu-1gb", "ssh_keys": [ 289794, "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"example.com","region":"nyc3","size":"s-1vcpu-1gb","image":"ubuntu-20-04-x64","ssh_keys":[289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"],"backups":true,"ipv6":true,"monitoring":true,"tags":["env:prod","web"],"user_data":"#cloud-config\nruncmd:\n - touch /test.txt\n","vpc_uuid":"760e09ef-dc84-11e8-981e-3cfdfeaae000","subnet_uuid":"9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1"}' \ "https://api.digitalocean.com/v2/droplets" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.DropletCreateRequest{ Name: "example.com", Region: "nyc3", Size: "s-1vcpu-1gb", Image: godo.DropletCreateImage{ Slug: "ubuntu-20-04-x64", }, SSHKeys: []godo.DropletCreateSSHKey{ godo.DropletCreateSSHKey{ID: 289794}, godo.DropletCreateSSHKey{Fingerprint: "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"} }, Backups: true, IPv6: true, Monitoring: true, Tags: []string{"env:prod","web"}, UserData: "#cloud-config\nruncmd:\n - touch /test.txt\n", VPCUUID: "760e09ef-dc84-11e8-981e-3cfdfeaae000", SubnetUUID: "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) droplet = DropletKit::Droplet.new( name: 'example.com', region: 'nyc3', size: 's-1vcpu-1gb', image: 'ubuntu-20-04-x64', ssh_keys: [289794,"3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45"], backups: true, ipv6: true, monitoring: true, tags: ["env:prod","web"], user_data: "#cloud-config\nruncmd:\n - touch /test.txt\n", vpc_uuid: "760e09ef-dc84-11e8-981e-3cfdfeaae000", subnet_uuid: "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", ) client.droplets.create(droplet) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "example.com", "region": "nyc3", "size": "s-1vcpu-1gb", "image": "ubuntu-20-04-x64", "ssh_keys": [ 289794, "3b:16:e4:bf:8b:00:8b:b8:59:8c:a9:d3:f0:19:fa:45" ], "backups": True, "ipv6": True, "monitoring": True, "tags": [ "env:prod", "web" ], "user_data": "#cloud-config\nruncmd:\n - touch /test.txt\n", "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1" } resp = client.droplets.create(body=req) ``` #### Responses **202** Accepted Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` ### Single Droplet Response `droplet` object required **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional **Show child properties** `amount` integer optional Example: `25` The amount of space allocated to the disk. `unit` string optional Example: `gib` The unit of measure for the disk size. `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional **Show child properties** `amount` integer optional Example: `25` The amount of VRAM allocated to the GPU. `unit` string optional Example: `gib` The unit of measure for the VRAM. `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional **Show child properties** `gateway` string optional Example: `104.236.0.1` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. `ip_address` string (ipv4) optional Example: `104.236.32.182` The IP address of the IPv4 network interface. `netmask` string (ipv4) optional Example: `255.255.192.0` The netmask of the IPv4 network interface. `type` string, one of: public, private optional Example: `public` The type of the IPv4 network interface. `v6` array of object optional **Show child properties** `gateway` string (ipv6) optional Example: `2604:a880:0:1010::1` The gateway of the specified IPv6 network interface. `ip_address` string (ipv6) optional Example: `2604:a880:0:1010::18a:a001` The IP address of the IPv6 network interface. `netmask` integer optional Example: `64` The netmask of the IPv6 network interface. `type` string, one of: public optional Example: `public` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `links` object required **Show child properties** `actions` array of object optional **Show child properties** `href` string (uri) optional Example: `https://api.digitalocean.com/v2/actions/7515` A URL that can be used to access the action. `id` integer optional Example: `7515` A unique numeric ID that can be used to identify and reference an action. `rel` string optional Example: `create` A string specifying the type of the related action. ### Multiple Droplet Response `droplets` array of object required **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional **Show child properties** `amount` integer optional Example: `25` The amount of space allocated to the disk. `unit` string optional Example: `gib` The unit of measure for the disk size. `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional **Show child properties** `amount` integer optional Example: `25` The amount of VRAM allocated to the GPU. `unit` string optional Example: `gib` The unit of measure for the VRAM. `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional **Show child properties** `gateway` string optional Example: `104.236.0.1` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. `ip_address` string (ipv4) optional Example: `104.236.32.182` The IP address of the IPv4 network interface. `netmask` string (ipv4) optional Example: `255.255.192.0` The netmask of the IPv4 network interface. `type` string, one of: public, private optional Example: `public` The type of the IPv4 network interface. `v6` array of object optional **Show child properties** `gateway` string (ipv6) optional Example: `2604:a880:0:1010::1` The gateway of the specified IPv6 network interface. `ip_address` string (ipv6) optional Example: `2604:a880:0:1010::18a:a001` The IP address of the IPv6 network interface. `netmask` integer optional Example: `64` The netmask of the IPv6 network interface. `type` string, one of: public optional Example: `public` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `links` object required **Show child properties** `actions` array of object optional **Show child properties** `href` string (uri) optional Example: `https://api.digitalocean.com/v2/actions/7515` A URL that can be used to access the action. `id` integer optional Example: `7515` A unique numeric ID that can be used to identify and reference an action. `rel` string optional Example: `create` A string specifying the type of the related action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** Example ```json { "droplet": { "backup_ids": [], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6", "monitoring" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "example.com", "networks": { "v4": [], "v6": [] }, "next_backup_window": null, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "new", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [] }, "links": { "actions": [ { "href": "https://api.digitalocean.com/v2/actions/7515", "id": 7515, "rel": "create" } ] } } ``` ```json { "droplets": [ { "backup_ids": [], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6", "monitoring" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "sub-01.example.com", "networks": { "v4": [], "v6": [] }, "next_backup_window": null, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "new", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [] }, { "backup_ids": [], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6", "monitoring" ], "id": 3164445, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "sub-02.example.com", "networks": { "v4": [], "v6": [] }, "next_backup_window": null, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [], "status": "new", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [] } ], "links": { "actions": [ { "href": "https://api.digitalocean.com/v2/actions/7515", "id": 7515, "rel": "create" }, { "href": "https://api.digitalocean.com/v2/actions/7516", "id": 7516, "rel": "create" } ] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Deleting Droplets by Tag `/v2/droplets` To delete **all** Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your DELETE request. For example, `/v2/droplets?tag_name=$TAG_NAME`. This endpoint requires `tag:read` scope. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Query Parameters `tag_name` string required Example: `env:test` Specifies Droplets to be deleted by tag. ##### Request: `/v2/droplets` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets?tag_name=awesome" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() client.Droplets.DeleteByTag(ctx, "awesome") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.droplets.delete_for_tag(tag_name: awesome) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.destroy_by_tag(tag_name="production") ``` #### Responses **204** The action was successful and the response body is empty. This response has content-type set. Response Headers `content-type` string The type of data that is returned from a request. `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Droplet `/v2/droplets/{droplet_id}` To show information about an individual Droplet, send a GET request to `/v2/droplets/$DROPLET_ID`. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() droplet, _, err := client.Droplets.Get(ctx, 3164494) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.droplets.find(id: 3164494) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.get(droplet_id=594828) ``` #### Responses **200** The response will be a JSON object with a key called droplet. This will be set to a JSON object that contains the standard Droplet attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `droplet` object optional **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional **Show child properties** `amount` integer optional Example: `25` The amount of space allocated to the disk. `unit` string optional Example: `gib` The unit of measure for the disk size. `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional **Show child properties** `amount` integer optional Example: `25` The amount of VRAM allocated to the GPU. `unit` string optional Example: `gib` The unit of measure for the VRAM. `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional **Show child properties** `gateway` string optional Example: `104.236.0.1` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. `ip_address` string (ipv4) optional Example: `104.236.32.182` The IP address of the IPv4 network interface. `netmask` string (ipv4) optional Example: `255.255.192.0` The netmask of the IPv4 network interface. `type` string, one of: public, private optional Example: `public` The type of the IPv4 network interface. `v6` array of object optional **Show child properties** `gateway` string (ipv6) optional Example: `2604:a880:0:1010::1` The gateway of the specified IPv6 network interface. `ip_address` string (ipv6) optional Example: `2604:a880:0:1010::18a:a001` The IP address of the IPv6 network interface. `netmask` integer optional Example: `64` The netmask of the IPv6 network interface. `type` string, one of: public optional Example: `public` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "droplet": { "backup_ids": [ 53893572 ], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [ { "size": { "amount": 25, "unit": "gib" }, "type": "local" } ], "features": [ "backups", "private_networking", "ipv6" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "snapshot" }, "kernel": null, "locked": false, "memory": 1024, "name": "example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.124", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.165.1", "ip_address": "192.241.165.154", "netmask": "255.255.255.0", "type": "public" } ], "v6": [ { "gateway": "2604:a880:0:1010::1", "ip_address": "2604:a880:0:1010::18a:a001", "netmask": 64, "type": "public" } ] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [ 67512819 ], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete an Existing Droplet `/v2/droplets/{droplet_id}` To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Droplets.Delete(ctx, 3164494) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.droplets.delete(id: 3164494) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.destroy(droplet_id=553456) ``` #### Responses **204** The action was successful and the response body is empty. This response has content-type set. Response Headers `content-type` string The type of data that is returned from a request. `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Backups for a Droplet `/v2/droplets/{droplet_id}/backups` To retrieve any backups associated with a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/backups`. You will get back a JSON object that has a `backups` key. This will be set to an array of backup objects, each of which contain the standard Droplet backup attributes. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/{droplet_id}/backups` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3067509/backups" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } backups, _, err := client.Droplets.Backups(ctx, 3164494, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) backups = client.droplets.backups(id: 3164494) backups.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_backups(droplet_id=594828) ``` #### Responses **200** A JSON object with an backups key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `backups` array of object optional **Show child properties** `id` integer required Example: `6372321` The unique identifier for the snapshot or backup. `created_at` string (date-time) required Example: `2020-07-28T16:47:44Z` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. `min_disk_size` integer required Example: `25` The minimum size in GB required for a volume or Droplet to use this snapshot. `name` string required Example: `web-01-1595954862243` A human-readable name for the snapshot. `regions` array of string required Example: `["nyc3","sfo3"]` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. `size_gigabytes` number (float) required Example: `2.34` The billable size of the snapshot in gigabytes. `type` string, one of: snapshot, backup required Example: `snapshot` Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "backups": [ { "created_at": "2020-07-29T01:44:35Z", "distribution": "Ubuntu", "id": 67539192, "min_disk_size": 50, "name": "web-01- 2020-07-29", "public": false, "regions": [ "nyc3" ], "size_gigabytes": 2.34, "slug": null, "type": "backup" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve the Backup Policy for an Existing Droplet `/v2/droplets/{droplet_id}/backups/policy` To show information about an individual Droplet's backup policy, send a GET request to `/v2/droplets/$DROPLET_ID/backups/policy`. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}/backups/policy` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/backups/policy" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() droplet, _, err := client.Droplets.GetBackupPolicy(ctx, 444909706) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.get_backup_policy(droplet_id=444909706) ``` #### Responses **200** The response will be a JSON object with a key called policy. This will be set to a JSON object that contains the standard Droplet backup policy attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `policy` object optional **Show child properties** `backup_enabled` boolean optional Example: `true` A boolean value indicating whether backups are enabled for the Droplet. `backup_policy` object optional `droplet_id` integer optional Example: `7101383` The unique identifier for the Droplet. `next_backup_window` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "policy": { "backup_enabled": true, "backup_policy": { "hour": 20, "plan": "weekly", "retention_period_days": 28, "weekday": "SUN", "window_length_hours": 4 }, "droplet_id": 444909706, "next_backup_window": { "end": "2024-09-16T00:00:00Z", "start": "2024-09-15T20:00:00Z" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Backup Policies for All Existing Droplets `/v2/droplets/backups/policies` To list information about the backup policies for all Droplets in the account, send a GET request to `/v2/droplets/backups/policies`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/backups/policies` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/backups/policies" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() droplet, _, err := client.Droplets.ListBackupPolicies(ctx) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_backup_policies() ``` #### Responses **200** A JSON object with a policies key set to a map. The keys are Droplet IDs and the values are objects containing the backup policy information for each Droplet. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `policies` object optional A map where the keys are the Droplet IDs and the values are objects containing the backup policy information for each Droplet. **Show child properties** `(additional properties)` object optional Additional properties are allowed. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": {}, "meta": { "total": 3 }, "policies": { "436444618": { "backup_enabled": false, "droplet_id": 436444618 }, "444909314": { "backup_enabled": true, "backup_policy": { "hour": 20, "plan": "daily", "retention_period_days": 7, "window_length_hours": 4 }, "droplet_id": 444909314, "next_backup_window": { "end": "2024-09-14T00:00:00Z", "start": "2024-09-13T20:00:00Z" } }, "444909706": { "backup_enabled": true, "backup_policy": { "hour": 20, "plan": "weekly", "retention_period_days": 28, "weekday": "SUN", "window_length_hours": 4 }, "droplet_id": 444909706, "next_backup_window": { "end": "2024-09-16T00:00:00Z", "start": "2024-09-15T20:00:00Z" } } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Supported Droplet Backup Policies `/v2/droplets/backups/supported_policies` To retrieve a list of all supported Droplet backup policies, send a GET request to `/v2/droplets/backups/supported_policies`. ##### Request: `/v2/droplets/backups/supported_policies` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/backups/supported_policies" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() droplet, _, err := client.Droplets.ListSupportedBackupPolicies(ctx) } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_supported_backup_policies() ``` #### Responses **200** A JSON object with an supported_policies key set to an array of objects describing each supported backup policy. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `supported_policies` array of object optional **Show child properties** `name` string optional Example: `daily` The name of the Droplet backup plan. `possible_days` array of string optional Example: `["SUN","MON","TUE","WED","THU","FRI","SAT"]` The day of the week the backup will occur. `possible_window_starts` array of integer optional Example: `[0,4,8,12,16,20]` An array of integers representing the hours of the day that a backup can start. `retention_period_days` integer optional Example: `7` The number of days that a backup will be kept. `window_length_hours` integer optional Example: `4` The number of hours that a backup window is open. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "supported_policies": [ { "name": "weekly", "possible_days": [ "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" ], "possible_window_starts": [ 0, 4, 8, 12, 16, 20 ], "retention_period_days": 28, "window_length_hours": 4 }, { "name": "daily", "possible_days": [], "possible_window_starts": [ 0, 4, 8, 12, 16, 20 ], "retention_period_days": 7, "window_length_hours": 4 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Snapshots for a Droplet `/v2/droplets/{droplet_id}/snapshots` To retrieve the snapshots that have been created from a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/snapshots`. You will get back a JSON object that has a `snapshots` key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/{droplet_id}/snapshots` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/snapshots?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } snapshots, _, err := client.Droplets.Snapshots(ctx, 3164494, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) snapshots = client.droplets.snapshots(id: 3164494) snapshots.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_snapshots(droplet_id=3929391) ``` #### Responses **200** A JSON object with an snapshots key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `snapshots` array of object optional **Show child properties** `id` integer required Example: `6372321` The unique identifier for the snapshot or backup. `created_at` string (date-time) required Example: `2020-07-28T16:47:44Z` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. `min_disk_size` integer required Example: `25` The minimum size in GB required for a volume or Droplet to use this snapshot. `name` string required Example: `web-01-1595954862243` A human-readable name for the snapshot. `regions` array of string required Example: `["nyc3","sfo3"]` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. `size_gigabytes` number (float) required Example: `2.34` The billable size of the snapshot in gigabytes. `type` string, one of: snapshot, backup required Example: `snapshot` Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "links": {}, "meta": { "total": 1 }, "snapshots": [ { "created_at": "2020-07-28T16:47:44Z", "id": 6372321, "min_disk_size": 25, "name": "web-01-1595954862243", "regions": [ "nyc3", "sfo3" ], "size_gigabytes": 2.34, "type": "snapshot" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Available Kernels for a Droplet `/v2/droplets/{droplet_id}/kernels` To retrieve a list of all kernels available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/kernels` The response will be a JSON object that has a key called `kernels`. This will be set to an array of `kernel` objects, each of which contain the standard `kernel` attributes. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/{droplet_id}/kernels` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/kernels?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } kernels, _, err := client.Droplets.Kernels(ctx, 3164494, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) kernels = client.droplets.kernels(id: 3164494) kernels.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_kernels(droplet_id=594828) ``` #### Responses **200** A JSON object that has a key called kernels. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `kernels` array of object optional **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "kernels": [ { "id": 7515, "name": "DigitalOcean GrubLoader v0.2 (20160714)", "version": "2016.07.13-DigitalOcean_loader_Ubuntu" } ], "links": { "pages": { "last": "https://api.digitalocean.com/v2/droplets/3164444/kernels?page=171\u0026per_page=1", "next": "https://api.digitalocean.com/v2/droplets/3164444/kernels?page=2\u0026per_page=1" } }, "meta": { "total": 171 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List all Firewalls Applied to a Droplet `/v2/droplets/{droplet_id}/firewalls` To retrieve a list of all firewalls available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/firewalls` The response will be a JSON object that has a key called `firewalls`. This will be set to an array of `firewall` objects, each of which contain the standard `firewall` attributes. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/droplets/{droplet_id}/firewalls` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/droplets/{droplet_id}/firewalls" ``` #### Responses **200** A JSON object that has a key called firewalls. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `firewalls` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "firewalls": [ { "created_at": "2020-05-23T21:24:00Z", "droplet_ids": [ 89989, 33322 ], "id": "bb4b2611-3d72-467b-8602-280330ecd65c", "inbound_rules": [ { "action": "allow", "ports": "8000-9000", "protocol": "udp", "sources": { "addresses": [ "1.2.3.4", "18.0.0.0/8" ], "droplet_ids": [ 8282823, 3930392 ], "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ], "tags": [ "base-image", "dev" ] } } ], "name": "firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "1.2.3.4", "18.0.0.0/8" ], "droplet_ids": [ 3827493, 213213 ], "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ], "tags": [ "base-image", "prod" ] }, "ports": "7000-9000", "protocol": "tcp" } ], "pending_changes": [ { "droplet_id": 8043964, "removing": true, "status": "waiting" } ], "status": "succeeded", "tags": [ "base-image", "prod" ] } ], "links": { "pages": {} }, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Neighbors for a Droplet `/v2/droplets/{droplet_id}/neighbors` To retrieve a list of any "neighbors" (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/neighbors`. The results will be returned as a JSON object with a key of `droplets`. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}/neighbors` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/neighbors" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_neighbors(droplet_id=594828) ``` #### Responses **200** A JSON object with an droplets key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `droplets` array of object optional **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional **Show child properties** `amount` integer optional Example: `25` The amount of space allocated to the disk. `unit` string optional Example: `gib` The unit of measure for the disk size. `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional **Show child properties** `amount` integer optional Example: `25` The amount of VRAM allocated to the GPU. `unit` string optional Example: `gib` The unit of measure for the VRAM. `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional **Show child properties** `gateway` string optional Example: `104.236.0.1` The gateway of the specified IPv4 network interface. For private interfaces, a gateway is not provided. This is denoted by returning `nil` as its value. `ip_address` string (ipv4) optional Example: `104.236.32.182` The IP address of the IPv4 network interface. `netmask` string (ipv4) optional Example: `255.255.192.0` The netmask of the IPv4 network interface. `type` string, one of: public, private optional Example: `public` The type of the IPv4 network interface. `v6` array of object optional **Show child properties** `gateway` string (ipv6) optional Example: `2604:a880:0:1010::1` The gateway of the specified IPv6 network interface. `ip_address` string (ipv6) optional Example: `2604:a880:0:1010::18a:a001` The IP address of the IPv6 network interface. `netmask` integer optional Example: `64` The netmask of the IPv6 network interface. `type` string, one of: public optional Example: `public` The type of the IPv6 network interface. **Note**: IPv6 private networking is not currently supported. `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "droplets": [ { "backup_ids": [ 53893572 ], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "disk_info": [], "features": [ "backups", "private_networking", "ipv6" ], "id": 3164444, "locked": false, "memory": 1024, "name": "example.com", "size_slug": "s-1vcpu-1gb", "snapshot_ids": [ 67512819 ], "status": "active", "subnet_uuid": "9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [ "506f78a4-e098-11e5-ad9f-000f53306ae1" ], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Associated Resources for a Droplet `/v2/droplets/{droplet_id}/destroy_with_associated_resources` To list the associated billable resources that can be destroyed along with a Droplet, send a GET request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources` endpoint. This endpoint will only return resources that you are authorized to see. For example, to see associated Reserved IPs, include the `reserved_ip:read` scope. The response will be a JSON object containing `snapshots`, `volumes`, and `volume_snapshots` keys. Each will be set to an array of objects containing information about the associated resources. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}/destroy_with_associated_resources` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_associated_resources(droplet_id=594828) ``` #### Responses **200** A JSON object containing snapshots, volumes, and volume_snapshots keys. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `floating_ips` array of object optional Floating IPs that are associated with this Droplet. Requires `reserved_ip:read` scope. **Show child properties** `cost` string optional Example: `0.05` The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. `id` string optional Example: `61486916` The unique identifier for the resource associated with the Droplet. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource associated with the Droplet. `reserved_ips` array of object optional Reserved IPs that are associated with this Droplet. Requires `reserved_ip:read` scope. **Show child properties** `cost` string optional Example: `0.05` The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. `id` string optional Example: `61486916` The unique identifier for the resource associated with the Droplet. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource associated with the Droplet. `snapshots` array of object optional Snapshots that are associated with this Droplet. Requires `image:read` scope. **Show child properties** `cost` string optional Example: `0.05` The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. `id` string optional Example: `61486916` The unique identifier for the resource associated with the Droplet. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource associated with the Droplet. `volume_snapshots` array of object optional Volume Snapshots that are associated with this Droplet. Requires `block_storage_snapshot:read` scope. **Show child properties** `cost` string optional Example: `0.05` The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. `id` string optional Example: `61486916` The unique identifier for the resource associated with the Droplet. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource associated with the Droplet. `volumes` array of object optional Volumes that are associated with this Droplet. Requires `block_storage:read` scope. **Show child properties** `cost` string optional Example: `0.05` The cost of the resource in USD per month if the resource is retained after the Droplet is destroyed. `id` string optional Example: `61486916` The unique identifier for the resource associated with the Droplet. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource associated with the Droplet. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "floating_ips": [ { "cost": "4.00", "id": "6186916", "name": "45.55.96.47" } ], "reserved_ips": [ { "cost": "4.00", "id": "6186916", "name": "45.55.96.47" } ], "snapshots": [ { "cost": "0.05", "id": "61486916", "name": "ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330" } ], "volume_snapshots": [ { "cost": "0.04", "id": "edb0478d-7436-11ea-86e6-0a58ac144b91", "name": "volume-nyc1-01-1585758983629" } ], "volumes": [ { "cost": "10.00", "id": "ba49449a-7435-11ea-b89e-0a58ac14480f", "name": "volume-nyc1-01" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Selectively Destroy a Droplet and its Associated Resources `/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective` To destroy a Droplet along with a sub-set of its associated resources, send a DELETE request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective` endpoint. The JSON body of the request should include `reserved_ips`, `snapshots`, `volumes`, or `volume_snapshots` keys each set to an array of IDs for the associated resources to be destroyed. The IDs can be found by querying the Droplet's associated resources. Any associated resource not included in the request will remain and continue to accrue changes on your account. A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Request Body: `application/json` `floating_ips` array of string optional Deprecated Example: `["6186916"]` An array of unique identifiers for the floating IPs to be scheduled for deletion. `reserved_ips` array of string optional Example: `["6186916"]` An array of unique identifiers for the reserved IPs to be scheduled for deletion. `snapshots` array of string optional Example: `["61486916"]` An array of unique identifiers for the snapshots to be scheduled for deletion. `volume_snapshots` array of string optional Example: `["edb0478d-7436-11ea-86e6-0a58ac144b91"]` An array of unique identifiers for the volume snapshots to be scheduled for deletion. `volumes` array of string optional Example: `["ba49449a-7435-11ea-b89e-0a58ac14480f"]` An array of unique identifiers for the volumes to be scheduled for deletion. ##### Request: `/v2/droplets/{droplet_id}/destroy_with_associated_resources/selective` ### Payload Content type `application/json` ```json { "floating_ips": [ "6186916" ], "reserved_ips": [ "6186916" ], "snapshots": [ "61486916" ], "volume_snapshots": [ "edb0478d-7436-11ea-86e6-0a58ac144b91" ], "volumes": [ "ba49449a-7435-11ea-b89e-0a58ac14480f" ] } ``` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"reserved_ips":["6186916"],"snapshots": ["61486916"],"volumes": ["ba49449a-7435-11ea-b89e-0a58ac14480f"],"volume_snapshots": ["edb0478d-7436-11ea-86e6-0a58ac144b91"]}' \ "https://api.digitalocean.com/v2/droplets/187000742/destroy_with_associated_resources/selective" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.destroy_with_associated_resources_selective(droplet_id=524512) ``` #### Responses **202** This does not indicate the success or failure of any operation, just that the request has been accepted for processing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Destroy a Droplet and All of its Associated Resources (Dangerous) `/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous` To destroy a Droplet along with all of its associated resources, send a DELETE request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous` endpoint. The headers of this request must include an `X-Dangerous` key set to `true`. To preview which resources will be destroyed, first query the Droplet's associated resources. This operation *can not* be reverse and should be used with caution. A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. #### Header Parameters `X-Dangerous` boolean required Example: `true` Acknowledge this action will destroy the Droplet and all associated resources and *can not* be reversed. ##### Request: `/v2/droplets/{droplet_id}/destroy_with_associated_resources/dangerous` ### cURL ```bash curl -X DELETE -H "X-Dangerous: true" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/187000742/destroy_with_associated_resources/dangerous" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.destroy_with_associated_resources_dangerous(droplet_id=524512) ``` #### Responses **202** This does not indicate the success or failure of any operation, just that the request has been accepted for processing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Check Status of a Droplet Destroy with Associated Resources Request `/v2/droplets/{droplet_id}/destroy_with_associated_resources/status` To check on the status of a request to destroy a Droplet with its associated resources, send a GET request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/status` endpoint. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}/destroy_with_associated_resources/status` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources/status" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.get_destroy_associated_resources_status(droplet_id=5624512) ``` #### Responses **200** A JSON object containing containing the status of a request to destroy a Droplet and its associated resources. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `completed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the requested action was completed. `droplet` object optional An object containing information about a resource scheduled for deletion. **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. `failures` integer optional Example: `0` A count of the associated resources that failed to be destroyed, if any. `resources` object optional An object containing additional information about resource related to a Droplet requested to be destroyed. **Show child properties** `floating_ips` array of object optional **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. `reserved_ips` array of object optional **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. `snapshots` array of object optional **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. `volume_snapshots` array of object optional **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. `volumes` array of object optional **Show child properties** `destroyed_at` string (date-time) optional Example: `2020-04-01T18:11:49Z` A time value given in ISO8601 combined date and time format indicating when the resource was destroyed if the request was successful. `error_message` string optional Example: ` ` A string indicating that the resource was not successfully destroyed and providing additional information. `id` string optional Example: `61486916` The unique identifier for the resource scheduled for deletion. `name` string optional Example: `ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330` The name of the resource scheduled for deletion. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "completed_at": "2020-04-01T18:11:49Z", "droplet": { "destroyed_at": "2020-04-01T18:11:49Z", "id": "187000742", "name": "ubuntu-s-1vcpu-1gb-nyc1-01" }, "failures": 0, "resources": { "floating_ips": [ { "destroyed_at": "2020-04-01T18:11:44Z", "id": "6186916", "name": "45.55.96.47" } ], "reserved_ips": [ { "destroyed_at": "2020-04-01T18:11:44Z", "id": "6186916", "name": "45.55.96.47" } ], "snapshots": [ { "destroyed_at": "2020-04-01T18:11:44Z", "id": "61486916", "name": "ubuntu-s-1vcpu-1gb-nyc1-01-1585758823330" } ], "volume_snapshots": [ { "destroyed_at": "2020-04-01T18:11:44Z", "id": "edb0478d-7436-11ea-86e6-0a58ac144b91", "name": "volume-nyc1-01-1585758983629" } ], "volumes": [] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Retry a Droplet Destroy with Associated Resources Request `/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry` If the status of a request to destroy a Droplet with its associated resources reported any errors, it can be retried by sending a POST request to the `/v2/droplets/$DROPLET_ID/destroy_with_associated_resources/retry` endpoint. Only one destroy can be active at a time per Droplet. If a retry is issued while another destroy is in progress for the Droplet a 409 status code will be returned. A successful response will include a 202 response code and no content. #### Path Parameters `droplet_id` integer >= 1 required Example: `3164444` A unique identifier for a Droplet instance. ##### Request: `/v2/droplets/{droplet_id}/destroy_with_associated_resources/retry` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/droplets/3164494/destroy_with_associated_resources/retry" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.destroy_retry_with_associated_resources(droplet_id=524512) ``` #### Responses **202** This does not indicate the success or failure of any operation, just that the request has been accepted for processing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List All Droplet Neighbors `/v2/reports/droplet_neighbors_ids` To retrieve a list of all Droplets that are co-located on the same physical hardware, send a GET request to `/v2/reports/droplet_neighbors_ids`. The results will be returned as a JSON object with a key of `neighbor_ids`. This will be set to an array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server. An empty array indicates that all Droplets associated with your account are located on separate physical hardware. ##### Request: `/v2/reports/droplet_neighbors_ids` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/reports/droplet_neighbors_ids" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.droplets.list_neighbors_ids() ``` #### Responses **200** A JSON object with an neighbor_ids key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `neighbor_ids` array of array of integer optional Example: `[[168671828,168663509,168671815],[168671883,168671750]]` An array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "neighbor_ids": [ [ 168671828, 168663509, 168671815 ], [ 168671883, 168671750 ] ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Connect to Droplets with the Droplet Console](https://docs.digitalocean.com/products/droplets/how-to/connect-with-console/index.html.md), [How to Create a Droplet](https://docs.digitalocean.com/products/droplets/how-to/create/index.html.md), [Droplet Pricing](https://docs.digitalocean.com/products/droplets/details/pricing/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/embeddings/ --- title: Embeddings description: Text embedding vectors via `POST /v1/embeddings` on the [Serverless Inference](/reference/api/reference/serverless-inference/ base URL … product: Reference url: https://docs.digitalocean.com/reference/api/reference/embeddings/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Embeddings Generated on 4 Dec 2026 Text embedding vectors via `POST /v1/embeddings` on the \[Serverless Inference](https://docs.digitalocean.com/reference/api/reference/serverless-inference/ base URL `https://inference.do-ai.run` (bearer model access key). Base URL `https://inference.do-ai.run` ## Endpoints - **POST** [Create embedding](#inference_create_embedding) ## POST Create embedding `/v1/embeddings` **Authorizations: inference_bearer_auth** Http: Bearer ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Authenticate with a Bearer Authorization Header **Serverless Inference:** ``` curl -X POST -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://inference.do-ai.run/v1/chat/completions" ``` **Agent Inference:** ``` curl -X POST -H "Authorization: Bearer $AGENT_ACCESS_KEY" "https://{your-agent-url}.agents.do-ai.run/v1/chat/completions?agent=true" ``` **Note:** Agent Inference APIs use an `agent_access_key` (endpoint access key) instead of a DigitalOcean OAuth token. The `agent_access_key` is provided when you provision an agent endpoint and is scoped to that specific agent. It is not interchangeable with DigitalOcean OAuth tokens (`dop_v1_*`, `doo_v1_*`, `dor_v1_*`), which are used with Serverless Inference and the control-plane API at `https://api.digitalocean.com`. Create vector embeddings for one or more text inputs. OpenAI-compatible request and response. Unknown fields in the request body are rejected. There is no streaming response for this endpoint. #### Request Body: `application/json` `encoding_format` string, one of: float, base64 optional Example: `float` How embedding values are returned in each `data[].embedding` field. `input` array | string required Example: `hello world` A single string or 1–2048 strings; each string produces one row in `data`, in order. `model` string required Example: `qwen3-embedding-0.6b` Model id to use for embeddings. Must match a model your account can access. `user` string optional Example: `user-1234` Optional end-user identifier to help with abuse monitoring. ##### Request: `/v1/embeddings` ### Payload Content type `application/json` ```json { "encoding_format": "float", "input": "hello world", "model": "qwen3-embedding-0.6b", "user": "user-1234" } ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.embeddings.create( model="qwen3-embedding-0.6b", input=["hello world", "goodbye world"], encoding_format="float", user="user-1234", ) for item in resp.data: print(item.index, item.embedding[:8]) ``` ### Go ```go package main import ( "context" "encoding/json" "fmt" "os" "github.com/digitalocean/godo" ) func main() { client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN")) ctx := context.Background() resp, _, err := client.Embeddings.New(ctx, &godo.EmbeddingNewParams{ Model: "qwen3-embedding-0.6b", Input: []string{"hello world", "goodbye world"}, EncodingFormat: "float", User: "user-1234", }) if err != nil { panic(err) } for _, item := range resp.Data { var vec []float32 if err := json.Unmarshal(item.Embedding, &vec); err != nil { panic(err) } head := vec if len(head) > 8 { head = head[:8] } fmt.Println(item.Index, head) } } ``` ### JavaScript ``` import { InferenceClient } from "@digitalocean/dots"; const client = new InferenceClient({ apiKey: process.env.DIGITALOCEAN_TOKEN, }); const resp = await client.embeddings.create({ model: "qwen3-embedding-0.6b", input: ["hello world", "goodbye world"], encoding_format: "float", user: "user-1234", }); for (const item of resp.data) { console.log(item.index, item.embedding.slice(0, 8)); } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"model":"qwen3-embedding-0.6b","input":["hello world","goodbye world"],"encoding_format":"float","user":"user-1234"}' \ "https://inference.do-ai.run/v1/embeddings" ``` #### Responses **200** Embeddings and usage for the given input or inputs, in order. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `data` array of object required One entry for each `input` string, in the same order. **Show child properties** `embedding` array | string required Example: `[0.0123,-0.0456,0.0001]` The embedding vector, or a base64-encoded string when the request set encoding_format to base64. `index` integer required Example: `0` Zero-based index of the corresponding `input` item (0 when `input` is a string). `object` string, one of: embedding required Example: `embedding` The object type, which is always `embedding`. `model` string required Example: `qwen3-embedding-0.6b` The embedding model that produced the vectors. `object` string, one of: list required Example: `list` The object type, which is always the string `list`. `usage` object required Token usage for the embeddings request. **Show child properties** `prompt_tokens` integer required Example: `6` Number of input tokens used for the embedding. `total_tokens` integer required Example: `6` Total billable tokens for the request. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "data": [ { "embedding": [ 0.0123, -0.0456, 0.0001 ], "index": 0, "object": "embedding" } ], "model": "qwen3-embedding-0.6b", "object": "list", "usage": { "prompt_tokens": 6, "total_tokens": 6 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Inference Pricing](https://docs.digitalocean.com/products/inference/details/pricing/index.html.md), [Supported Models on DigitalOcean Inference](https://docs.digitalocean.com/products/inference/details/models/index.html.md), [Use Serverless Inference](https://docs.digitalocean.com/products/inference/how-to/use-serverless-inference/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/firewalls/ --- title: Firewalls description: '[DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/) provide the ability to restrict network access to and …' product: Reference url: https://docs.digitalocean.com/reference/api/reference/firewalls/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Firewalls Generated on 4 Dec 2026 [DigitalOcean Cloud Firewalls](https://docs.digitalocean.com/products/networking/firewalls/index.html.md) provide the ability to restrict network access to and from a Droplet allowing you to define which ports will accept inbound or outbound connections. By sending requests to the `/v2/firewalls` endpoint, you can list, create, or delete firewalls as well as modify access rules. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Firewalls](#firewalls_list) - **POST** [Create a New Firewall](#firewalls_create) - **GET** [Retrieve an Existing Firewall](#firewalls_get) - **PUT** [Update a Firewall](#firewalls_update) - **DELETE** [Delete a Firewall](#firewalls_delete) - **POST** [Add Droplets to a Firewall](#firewalls_assign_droplets) - **DELETE** [Remove Droplets from a Firewall](#firewalls_delete_droplets) - **POST** [Add Tags to a Firewall](#firewalls_add_tags) - **DELETE** [Remove Tags from a Firewall](#firewalls_delete_tags) - **POST** [Add Rules to a Firewall](#firewalls_add_rules) - **DELETE** [Remove Rules from a Firewall](#firewalls_delete_rules) ## GET List All Firewalls `/v2/firewalls` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: firewall:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the firewalls available on your account, send a GET request to `/v2/firewalls`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` ##### Request: `/v2/firewalls` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/firewalls" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } firewalls, _, err := client.Firewalls.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) firewalls = client.firewalls.all firewalls.each ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.firewalls.list() ``` #### Responses **200** To list all of the firewalls available on your account, send a GET request to /v2/firewalls.Firewalls responses will include only the resources that you are granted to see. Ensure that your API token includes all necessary :read permissions for requested firewall. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `firewalls` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "firewalls": [ { "created_at": "2017-05-23T21:23:59Z", "droplet_ids": [ 8043964 ], "id": "fb6045f1-cf1d-4ca3-bfac-18832663025b", "inbound_rules": [ { "action": "allow", "ports": "80", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "80", "protocol": "tcp" } ], "pending_changes": [], "status": "succeeded", "tags": [] } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Firewall `/v2/firewalls` To create a new firewall, send a POST request to `/v2/firewalls`. The request must contain at least one inbound or outbound access rule. #### Request Body: `application/json` `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required ##### Request: `/v2/firewalls` ### Payload Content type `application/json` ```json { "droplet_ids": [ 8043964 ], "inbound_rules": [ { "action": "allow", "ports": "80", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "80", "protocol": "tcp" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"firewall","inbound_rules":[{"protocol":"tcp","ports":"80","action":"allow","sources":{"load_balancer_uids": ["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"protocol": "tcp","ports": "22","action":"allow","sources":{"tags": ["gateway"],"addresses": ["18.0.0.0/8"]}}],"outbound_rules":[{"protocol":"tcp","ports":"80","action":"allow","destinations":{"addresses":["0.0.0.0/0","::/0"]}}],"droplet_ids":[8043964]}' \ "https://api.digitalocean.com/v2/firewalls" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.FirewallRequest{ Name: 'firewall', InboundRules: []godo.InboundRule{ { Protocol: 'tcp', PortRange: '80', Action: 'allow', Sources: &godo.Sources{ LoadBalancerUIDs: []string{'4de7ac8b-495b-4884-9a69-1050c6793cd6'}, }, }, { Protocol: 'tcp', PortRange: '22', Action: 'allow', Sources: &godo.Sources{ Addresses: []string{'18.0.0.0/8'}, Tags: []string{'gateway'}, }, }, }, OutboundRules: []godo.OutboundRule{ { Protocol: 'tcp', PortRange: '80', Action: 'allow', Destinations: &godo.Destinations{ Addresses: []string{'0.0.0.0/0', '::/0'}, }, }, }, DropletIDs: []int{8043964}, } firewall, req, err := client.Firewalls.Create(ctx, createRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) firewall = DropletKit::Firewall.new( name: 'firewall', inbound_rules: [ DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '80', action: 'allow', sources: { load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'] } ), DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '22', action: 'allow', sources: { tags: ['gateway'], addresses: ['18.0.0.0/8'] } ) ], outbound_rules: [ DropletKit::FirewallOutboundRule.new( protocol: 'tcp', ports: '80', action: 'allow', destinations: { addresses: ['0.0.0.0/0', '::/0'], } ) ], droplet_ids: [8043964] ) client.firewalls.create(firewall) ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "firewall", "inbound_rules": [ { "protocol": "tcp", "ports": "80", "action": "allow", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "protocol": "tcp", "ports": "22", "action": "allow", "sources": { "tags": [ "gateway" ], "addresses": [ "18.0.0.0/8" ] } } ], "outbound_rules": [ { "protocol": "tcp", "ports": "80", "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] } } ], "droplet_ids": [ 8043964 ] } resp = client.firewalls.create(body=req) ``` #### Responses **202** The response will be a JSON object with a firewall key. This will be set to an object containing the standard firewall attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `firewall` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** ```json { "firewall": { "created_at": "2017-05-23T21:24:00Z", "droplet_ids": [ 8043964 ], "id": "bb4b2611-3d72-467b-8602-280330ecd65c", "inbound_rules": [ { "action": "allow", "ports": "80", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "80", "protocol": "tcp" } ], "pending_changes": [ { "droplet_id": 8043964, "removing": false, "status": "waiting" } ], "status": "waiting", "tags": [] } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Firewall `/v2/firewalls/{firewall_id}` To show information about an existing firewall, send a GET request to `/v2/firewalls/$FIREWALL_ID`. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. ##### Request: `/v2/firewalls/{firewall_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() firewall, _, err := client.Firewalls.Get(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c') } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.find(id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.firewalls.get(firewall_id= "as9di9d") ``` #### Responses **200** The response will be a JSON object with a firewall key. This will be set to an object containing the standard firewall attributes.Firewalls responses will include only the resources that you are granted to see. Ensure that your API token includes all necessary :read permissions for requested firewall. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `firewall` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "firewall": { "created_at": "2017-05-23T21:24:00Z", "droplet_ids": [ 8043964 ], "id": "bb4b2611-3d72-467b-8602-280330ecd65c", "inbound_rules": [ { "action": "allow", "ports": "80", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "80", "protocol": "tcp" } ], "pending_changes": [], "status": "succeeded", "tags": [] } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Firewall `/v2/firewalls/{firewall_id}` To update the configuration of an existing firewall, send a PUT request to `/v2/firewalls/$FIREWALL_ID`. The request should contain a full representation of the firewall including existing attributes. **Note that any attributes that are not provided will be reset to their default values.** You must have read access (e.g. `droplet:read`) to all resources attached to the firewall to successfully update the firewall. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required ##### Request: `/v2/firewalls/{firewall_id}` ### Payload Content type `application/json` ```json { "droplet_ids": [ 8043964 ], "inbound_rules": [ { "action": "allow", "ports": "8080", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "frontend-firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "8080", "protocol": "tcp" } ], "tags": [ "frontend" ] } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"firewall","inbound_rules":[{"protocol":"tcp","ports":"8080","action":"allow","sources":{"load_balancer_uids": ["4de7ac8b-495b-4884-9a69-1050c6793cd6"]}},{"protocol": "tcp","ports": "22","action":"allow","sources":{"tags": ["gateway"],"addresses": ["18.0.0.0/8"]}}],"outbound_rules":[{"protocol":"tcp","ports":"8080","action":"allow","destinations":{"addresses":["0.0.0.0/0","::/0"]}}],"droplet_ids":[8043964],"tags":["frontend"]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() updateRequest := &godo.FirewallRequest{ Name: 'firewall', InboundRules: []godo.InboundRule{ { Protocol: 'tcp', PortRange: '8080', Action: 'allow', Sources: &godo.Sources{ LoadBalancerUIDs: []string{'4de7ac8b-495b-4884-9a69-1050c6793cd6'}, }, }, { Protocol: 'tcp', PortRange: '22', Action: 'allow', Sources: &godo.Sources{ Addresses: []string{'18.0.0.0/8'}, Tags: []string{'gateway'}, }, }, }, OutboundRules: []godo.OutboundRule{ { Protocol: 'tcp', PortRange: '8080', Action: 'allow', Destinations: &godo.Destinations{ Addresses: []string{'0.0.0.0/0', '::/0'}, }, }, }, DropletIDs: []int{8043964}, Tags: []string{'frontend'} } firewall, req, err := client.Firewalls.Create(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', updateRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) firewall = DropletKit::Firewall.new( name: 'firewall', inbound_rules: [ DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '8080', action: 'allow', sources: { load_balancer_uids: ['4de7ac8b-495b-4884-9a69-1050c6793cd6'] } ), DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '22', action: 'allow', sources: { tags: ['gateway'], addresses: ['18.0.0.0/8'] } ) ], outbound_rules: [ DropletKit::FirewallOutboundRule.new( protocol: 'tcp', ports: '8080', action: 'allow', destinations: { addresses: ['0.0.0.0/0', '::/0'], } ) ], droplet_ids: [8043964], tags: ['frontend'] ) client.firewalls.update(firewall, id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "frontend-firewall", "inbound_rules": [ { "protocol": "tcp", "ports": "8080", "action": "allow", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "protocol": "tcp", "ports": "22", "action": "allow", "sources": { "tags": [ "gateway" ], "addresses": [ "18.0.0.0/8" ] } } ], "outbound_rules": [ { "protocol": "tcp", "ports": "8080", "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] } } ], "droplet_ids": [ 8043964 ], "tags": [ "frontend" ] } resp = client.firewalls.update(firewall_id="3afda9", body=req) ``` #### Responses **200** The response will be a JSON object with a firewall key. This will be set to an object containing the standard firewall attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `firewall` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2020-05-23T21:24:00Z` A time value given in ISO8601 combined date and time format that represents when the firewall was created. `droplet_ids` array of integer optional Nullable Example: `[8043964]` An array containing the IDs of the Droplets assigned to the firewall. Requires `droplet:read` scope. `id` string optional read-only Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. `name` string optional Example: `firewall` A human-readable name for a firewall. The name must begin with an alphanumeric character. Subsequent characters must either be alphanumeric characters, a period (.), or a dash (-). `pending_changes` array of object optional read-only Example: `[{"droplet_id":8043964,"removing":false,"status":"waiting"}]` An array of objects each containing the fields "droplet_id", "removing", and "status". It is provided to detail exactly which Droplets are having their security policies updated. When empty, all changes have been successfully applied. **Show child properties** `droplet_id` integer optional Example: `8043964` `removing` boolean optional Example: `false` `status` string optional Example: `waiting` `status` string, one of: waiting, succeeded, failed optional read-only Example: `waiting` A status string indicating the current state of the firewall. This can be "waiting", "succeeded", or "failed". `tags` object optional `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "firewall": { "created_at": "2020-05-23T21:24:00Z", "droplet_ids": [ 8043964 ], "id": "bb4b2611-3d72-467b-8602-280330ecd65c", "inbound_rules": [ { "action": "allow", "ports": "80", "protocol": "tcp", "sources": { "load_balancer_uids": [ "4de7ac8b-495b-4884-9a69-1050c6793cd6" ] } }, { "action": "allow", "ports": "22", "protocol": "tcp", "sources": { "addresses": [ "18.0.0.0/8" ], "tags": [ "gateway" ] } } ], "name": "frontend-firewall", "outbound_rules": [ { "action": "allow", "destinations": { "addresses": [ "0.0.0.0/0", "::/0" ] }, "ports": "80", "protocol": "tcp" } ], "pending_changes": [ { "droplet_id": 8043964, "removing": false, "status": "waiting" } ], "status": "waiting", "tags": [ "frontend" ] } } ``` **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Firewall `/v2/firewalls/{firewall_id}` To delete a firewall send a DELETE request to `/v2/firewalls/$FIREWALL_ID`. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. ##### Request: `/v2/firewalls/{firewall_id}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Firewalls.Delete(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c') } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.delete(id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.firewalls.delete(firewall_id= "as9di9d") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Droplets to a Firewall `/v2/firewalls/{firewall_id}/droplets` To assign a Droplet to a firewall, send a POST request to `/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there should be a `droplet_ids` attribute containing a list of Droplet IDs. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `droplet_ids` array of integer required Example: `[49696269]` An array containing the IDs of the Droplets to be assigned to the firewall. ##### Request: `/v2/firewalls/{firewall_id}/droplets` ### Payload Content type `application/json` ```json { "droplet_ids": [ 49696269 ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"droplet_ids":[49696269]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/droplets" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Firewalls.AddDroplets(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 49696269) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.add_droplets([49696269], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "droplet_ids": [ 49696269 ] } resp = client.firewalls.assign_droplets(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Remove Droplets from a Firewall `/v2/firewalls/{firewall_id}/droplets` To remove a Droplet from a firewall, send a DELETE request to `/v2/firewalls/$FIREWALL_ID/droplets`. In the body of the request, there should be a `droplet_ids` attribute containing a list of Droplet IDs. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `droplet_ids` array of integer required Example: `[49696269]` An array containing the IDs of the Droplets to be removed from the firewall. ##### Request: `/v2/firewalls/{firewall_id}/droplets` ### Payload Content type `application/json` ```json { "droplet_ids": [ 49696269 ] } ``` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"droplet_ids":[49696269]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/droplets" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Firewalls.RemoveDroplets(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 49696269) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.remove_droplets([49696269], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "droplet_ids": [ 49696269 ] } resp = client.firewalls.delete_droplets(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Tags to a Firewall `/v2/firewalls/{firewall_id}/tags` To assign a tag representing a group of Droplets to a firewall, send a POST request to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the request, there should be a `tags` attribute containing a list of tag names. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `tags` object required ##### Request: `/v2/firewalls/{firewall_id}/tags` ### Payload Content type `application/json` ```json { "tags": [ "frontend" ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tags":["frontend"]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/tags" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Firewalls.AddTags(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 'frontend') } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.add_tags(['frontend'], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "tags": [ "frontend" ] } resp = client.firewalls.add_tags(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Remove Tags from a Firewall `/v2/firewalls/{firewall_id}/tags` To remove a tag representing a group of Droplets from a firewall, send a DELETE request to `/v2/firewalls/$FIREWALL_ID/tags`. In the body of the request, there should be a `tags` attribute containing a list of tag names. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `tags` object required ##### Request: `/v2/firewalls/{firewall_id}/tags` ### Payload Content type `application/json` ```json { "tags": [ "frontend" ] } ``` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"tags":["frontend"]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/tags" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.Firewalls.RemoveTags(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', 'frontend') } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.firewalls.remove_tags(['frontend'], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "tags": [ "frontend" ] } resp = client.firewalls.delete_tags(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Add Rules to a Firewall `/v2/firewalls/{firewall_id}/rules` To add additional access rules to a firewall, send a POST request to `/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an inbound_rules and/or outbound_rules attribute containing an array of rules to be added. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required ##### Request: `/v2/firewalls/{firewall_id}/rules` ### Payload Content type `application/json` ```json { "inbound_rules": [ { "action": "allow", "ports": "3306", "protocol": "tcp", "sources": { "droplet_ids": [ 49696269 ] } } ], "outbound_rules": [ { "action": "allow", "destinations": { "droplet_ids": [ 49696269 ] }, "ports": "3306", "protocol": "tcp" } ] } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"inbound_rules":[{"protocol":"tcp","ports":"3306","action":"allow","sources":{"droplet_ids":[49696269]}}],"outbound_rules":[{"protocol":"tcp","ports":"3306","action":"allow","destinations":{"droplet_ids":[49696269]}}]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/rules" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() ruleRequest := &godo.FirewallRulesRequest{ InboundRules: []godo.InboundRule{ { Protocol: 'tcp', PortRange: '3306', Action: 'allow', Sources: &godo.Sources{ DropletIDs: []int{49696269}, }, }, }, OutboundRules: []godo.OutboundRule{ { Protocol: 'tcp', PortRange: '3306', Action: 'allow', Destinations: &godo.Destinations{ DropletIDs: []int{49696269}, }, }, }, } _, err := c.Firewalls.AddRules(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', ruleRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) inbound_rule = DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '3306', action: 'allow', sources: { droplet_ids: [49696269] } ) outbound_rule = DropletKit::FirewallOutboundRule.new( protocol: 'tcp', ports: '3306', action: 'allow', destinations: { droplet_ids: [49696269] } ) client.firewalls.add_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "inbound_rules": [ { "protocol": "tcp", "ports": "3306", "action": "allow", "sources": { "droplet_ids": [ 49696269 ] } } ], "outbound_rules": [ { "protocol": "tcp", "ports": "3306", "action": "allow", "destinations": { "droplet_ids": [ 49696269 ] } } ] } resp = client.firewalls.add_rules(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Remove Rules from a Firewall `/v2/firewalls/{firewall_id}/rules` To remove access rules from a firewall, send a DELETE request to `/v2/firewalls/$FIREWALL_ID/rules`. The body of the request may include an `inbound_rules` and/or `outbound_rules` attribute containing an array of rules to be removed. No response body will be sent back, but the response code will indicate success. Specifically, the response code will be a 204, which means that the action was successful with no returned body data. #### Path Parameters `firewall_id` string (uuid) required Example: `bb4b2611-3d72-467b-8602-280330ecd65c` A unique ID that can be used to identify and reference a firewall. #### Request Body: `application/json` `inbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `sources` object required `outbound_rules` array of object optional Nullable **Show child properties** `action` string, one of: allow, deny optional Example: `allow` The action to be taken when traffic matches the rule. This may be one of `allow` or `deny`. For backward compatibility, this field is optional. When not set, it defaults to `allow`. `ports` string required Example: `8000` The ports on which traffic will be allowed specified as a string containing a single port, a range (e.g. "8000-9000"), or "0" when all ports are open for a protocol. For ICMP rules this parameter will always return "0". `protocol` string, one of: tcp, udp, icmp required Example: `tcp` The type of traffic to be allowed. This may be one of `tcp`, `udp`, or `icmp`. `destinations` object required ##### Request: `/v2/firewalls/{firewall_id}/rules` ### Payload Content type `application/json` ```json { "inbound_rules": [ { "action": "allow", "ports": "3306", "protocol": "tcp", "sources": { "droplet_ids": [ 49696269 ] } } ], "outbound_rules": [ { "action": "allow", "destinations": { "droplet_ids": [ 49696269 ] }, "ports": "3306", "protocol": "tcp" } ] } ``` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"inbound_rules":[{"protocol":"tcp","ports":"3306","action":"allow","sources":{"droplet_ids":[49696269]}}],"outbound_rules":[{"protocol":"tcp","ports":"3306","action":"allow","destinations":{"droplet_ids":[49696269]}}]}' \ "https://api.digitalocean.com/v2/firewalls/bb4b2611-3d72-467b-8602-280330ecd65c/rules" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() ruleRequest := &godo.FirewallRulesRequest{ InboundRules: []godo.InboundRule{ { Protocol: 'tcp', PortRange: '3306', Action: 'allow', Sources: &godo.Sources{ DropletIDs: []int{49696269}, }, }, }, OutboundRules: []godo.OutboundRule{ { Protocol: 'tcp', PortRange: '3306', Action: 'allow', Destinations: &godo.Destinations{ DropletIDs: []int{49696269}, }, }, }, } _, err := c.Firewalls.RemoveRules(ctx, 'bb4b2611-3d72-467b-8602-280330ecd65c', ruleRequest) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) inbound_rule = DropletKit::FirewallInboundRule.new( protocol: 'tcp', ports: '3306', action: 'allow', sources: { droplet_ids: [49696269] } ) outbound_rule = DropletKit::FirewallOutboundRule.new( protocol: 'tcp', ports: '3306', action: 'allow', destinations: { droplet_ids: [49696269] } ) client.firewalls.remove_rules(inbound_rules: [inbound_rule], outbound_rules: [outbound_rule], id: 'bb4b2611-3d72-467b-8602-280330ecd65c') ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "inbound_rules": [ { "protocol": "tcp", "ports": "3306", "action": "allow", "sources": { "droplet_ids": [ 49696269 ] } } ], "outbound_rules": [ { "protocol": "tcp", "ports": "3306", "action": "allow", "destinations": { "droplet_ids": [ 49696269 ] } } ] } resp = client.firewalls.delete_rules(firewall_id="39fa4gz", body=req) ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** There was an error parsing the request body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "bad_request", "message": "error parsing request body", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [How to Configure Firewall Rules](https://docs.digitalocean.com/products/networking/firewalls/how-to/configure-rules/index.html.md), [Firewalls Pricing](https://docs.digitalocean.com/products/networking/firewalls/details/pricing/index.html.md), [How to Create Firewalls](https://docs.digitalocean.com/products/networking/firewalls/how-to/create/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/floating-ip-actions/ --- title: Floating IP Actions description: As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](/reference/api/reference/reserved-ips/. The Reserved IP product's … product: Reference url: https://docs.digitalocean.com/reference/api/reference/floating-ip-actions/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Floating IP Actions Generated on 4 Dec 2026 As of 16 June 2022, we have renamed the Floating IP product to \[Reserved IPs](https://docs.digitalocean.com/reference/api/reference/reserved-ips/. The Reserved IP product's endpoints function the exact same way as Floating IPs. The only difference is the name change throughout the URLs and fields. For example, the `floating_ips` field is now the `reserved_ips` field. The Floating IP endpoints will remain active until fall 2023 before being permanently deprecated. With the exception of the \[Projects API](/reference/api/reference/projects/, we will reflect this change as an additional field in the responses across the API where the `floating_ip` field is used. For example, the Droplet metadata response will contain the field `reserved_ips` in addition to the `floating_ips` field. Floating IPs retrieved using the Projects API will retain the original name. Floating IP actions are commands that can be given to a DigitalOcean floating IP. These requests are made on the actions endpoint of a specific floating IP. An action object is returned. These objects hold the current status of the requested action. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Actions for a Floating IP](#floatingIPsAction_list) - **POST** [Initiate a Floating IP Action](#floatingIPsAction_post) - **GET** [Retrieve an Existing Floating IP Action](#floatingIPsAction_get) ## GET List All Actions for a Floating IP `/v2/floating_ips/{floating_ip}/actions` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: reserved_ip:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To retrieve all actions that have been executed on a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions`. #### Path Parameters `floating_ip` string (ipv4) >= 1 required Example: `45.55.96.47` A floating IP address. ##### Request: `/v2/floating_ips/{floating_ip}/actions` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions?page=1&per_page=1" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, } actions, _, err := client.FloatingIPActions.List(ctx, '45.55.96.47', opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) actions = client.floating_ip_actions.all(ip: '45.55.96.47') actions.each ``` #### Responses **200** 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 floating IP action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `actions` array of object optional **Show child properties** `completed_at` string (date-time) optional Nullable Example: `2020-11-14T16:30:06Z` A time value given in ISO8601 combined date and time format that represents when the action was completed. `id` integer optional Example: `36804636` A unique numeric ID that can be used to identify and reference an action. `region` object optional **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `region_slug` string optional Nullable Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `resource_id` integer optional Nullable Example: `3164444` A unique identifier for the resource that the action is associated with. `resource_type` string optional Example: `droplet` The type of resource that the action is associated with. `started_at` string (date-time) optional Example: `2020-11-14T16:29:21Z` A time value given in ISO8601 combined date and time format that represents when the action was initiated. `status` string, one of: in-progress, completed, errored optional Example: `completed` The current status of the action. This can be "in-progress", "completed", or "errored". `type` string optional Example: `create` This is the type of action that the object represents. For example, this could be "transfer" to represent the state of an image transfer action. `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "actions": [ { "completed_at": "2015-11-21T21:51:09Z", "id": 72531856, "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 758604197, "resource_type": "floating_ip", "started_at": "2015-11-21T21:51:09Z", "status": "completed", "type": "reserve_ip" } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Initiate a Floating IP Action `/v2/floating_ips/{floating_ip}/actions` To initiate an action on a floating IP send a POST request to `/v2/floating_ips/$FLOATING_IP/actions`. In the JSON body to the request, set the `type` attribute to on of the supported action types: | Action | Details | |---|---| | `assign` | Assigns a floating IP to a Droplet | | `unassign` | Unassign a floating IP from a Droplet | #### Path Parameters `floating_ip` string (ipv4) >= 1 required Example: `45.55.96.47` A floating IP address. #### Request Body: `application/json` The `type` attribute set in the request body will specify the action that will be taken on the floating IP. **unassign** `type` string, one of: assign, unassign required The type of action to initiate for the floating IP. **assign** `type` string, one of: assign, unassign required The type of action to initiate for the floating IP. `droplet_id` integer required Example: `758604968` The ID of the Droplet that the floating IP will be assigned to. ##### Request: `/v2/floating_ips/{floating_ip}/actions` ### Payload Content type `application/json` Example ```json { "droplet_id": 758604968, "type": "assign" } ``` ```json { "type": "unassign" } ``` ### cURL ``` # Assign a Floating IP to a Droplet curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"assign","droplet_id":8219222}' \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions" # Unassign a Floating IP # curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"type":"unassign"}' \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() // Assign a Floating IP to a Droplet action, _, err := client.FloatingIPActions.Assign(ctx, "45.55.96.47", 8219222) // Unassign a Floating IP // action, _, err := client.FloatingIPActions.Unassign(ctx, "45.55.96.47") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) # Assign a Floating IP to a Droplet client.floating_ip_actions.assign(ip: '45.55.96.47', droplet_id: 8219222) # Unassign a Floating IP # client.floating_ip_actions.unassign(ip: '45.55.96.47') ``` #### Responses **201** The response will be an object with a key called action. The value of this will be an object that contains the standard floating IP action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "action": { "completed_at": "2015-11-12T17:51:14Z", "id": 72531856, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 758604968, "resource_type": "floating_ip", "started_at": "2015-11-12T17:51:03Z", "status": "completed", "type": "assign_ip" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Floating IP Action `/v2/floating_ips/{floating_ip}/actions/{action_id}` To retrieve the status of a floating IP action, send a GET request to `/v2/floating_ips/$FLOATING_IP/actions/$ACTION_ID`. #### Path Parameters `floating_ip` string (ipv4) >= 1 required Example: `45.55.96.47` A floating IP address. `action_id` integer >= 1 required Example: `36804636` A unique numeric ID that can be used to identify and reference an action. ##### Request: `/v2/floating_ips/{floating_ip}/actions/{action_id}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47/actions/72531856" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() action, _, err := client.FloatingIPActions.Get(ctx, "45.55.96.47", 72531856) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.floating_ip_actions.find(ip: '45.55.96.47', id: 72531856) ``` #### Responses **200** The response will be an object with a key called action. The value of this will be an object that contains the standard floating IP action attributes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `action` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "action": { "completed_at": "2015-11-12T17:51:14Z", "id": 72531856, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192gb" ], "slug": "nyc3" }, "region_slug": "nyc3", "resource_id": 758604968, "resource_type": "floating_ip", "started_at": "2015-11-12T17:51:03Z", "status": "completed", "type": "assign_ip" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Reserved IPs Pricing](https://docs.digitalocean.com/products/networking/reserved-ips/details/pricing/index.html.md), [How to Send Outbound Traffic Over a Reserved IP](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/index.html.md), [How to Reassign or Unassign Reserved IPs](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/modify/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/floating-ips/ --- title: Floating IPs description: As of 16 June 2022, we have renamed the Floating IP product to [Reserved IPs](/reference/api/reference/reserved-ips/. The Reserved IP product's … product: Reference url: https://docs.digitalocean.com/reference/api/reference/floating-ips/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Floating IPs Generated on 4 Dec 2026 As of 16 June 2022, we have renamed the Floating IP product to \[Reserved IPs](https://docs.digitalocean.com/reference/api/reference/reserved-ips/. The Reserved IP product's endpoints function the exact same way as Floating IPs. The only difference is the name change throughout the URLs and fields. For example, the `floating_ips` field is now the `reserved_ips` field. The Floating IP endpoints will remain active until fall 2023 before being permanently deprecated. With the exception of the \[Projects API](/reference/api/reference/projects/, we will reflect this change as an additional field in the responses across the API where the `floating_ip` field is used. For example, the Droplet metadata response will contain the field `reserved_ips` in addition to the `floating_ips` field. Floating IPs retrieved using the Projects API will retain the original name. [DigitalOcean Floating IPs](https://docs.digitalocean.com/products/networking/reserved-ips/index.html.md) are publicly-accessible static IP addresses that can be mapped to one of your Droplets. They can be used to create highly available setups or other configurations requiring movable addresses. Floating IPs are bound to a specific region. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List All Floating IPs](#floatingIPs_list) - **POST** [Create a New Floating IP](#floatingIPs_create) - **GET** [Retrieve an Existing Floating IP](#floatingIPs_get) - **DELETE** [Delete a Floating IP](#floatingIPs_delete) ## GET List All Floating IPs `/v2/floating_ips` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: reserved_ip:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` To list all of the floating IPs available on your account, send a GET request to `/v2/floating_ips`. #### Query Parameters `per_page` integer 1 – 200 optional Example: `2` Number of items returned per page Default: `20` `page` integer >= 1 optional Example: `1` Which 'page' of paginated results to return. Default: `1` `sort` string, one of: created_at, updated_at, ip, id, droplet_id optional Example: `droplet_id` Field to sort results by. Possible values are `created_at`, `updated_at`, `ip`, `id`, and `droplet_id`. Defaults to `id`. Any other value is treated as `id`. Sorting by `droplet_id` orders floating IPs by the Droplet they are assigned to. Unassigned floating IPs (`droplet` is null) sort as the lowest value, so they are returned first when `sort_direction` is `asc` and last when it is `desc`. `sort_direction` string, one of: asc, desc optional Example: `asc` Direction to sort results. Possible values are `asc` and `desc`. Defaults to `asc`. ##### Request: `/v2/floating_ips` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/floating_ips?page=1&per_page=20&sort=droplet_id&sort_direction=asc" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() opt := &godo.ListOptions{ Page: 1, PerPage: 200, Sort: "droplet_id", SortDirection: "asc", } floatingIPs, _, err := client.FloatingIPs.List(ctx, opt) } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) floating_ips = client.floating_ips.all floating_ips.each ``` #### Responses **200** The response will be a JSON object with a key called floating_ips. This will be set to an array of floating IP objects, each of which will contain the standard floating IP attributes Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `floating_ips` array of object optional **Show child properties** `droplet` object optional The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null. Requires `droplet:read` scope. **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `v6` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `ip` string (ipv4) optional Example: `45.55.96.47` The public IP address of the floating IP. It also serves as its identifier. `locked` boolean optional Example: `true` A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted. `project_id` string (uuid) optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The UUID of the project to which the reserved IP currently belongs. Requires `project:read` scope. `region` object optional `links` object optional **Show child properties** `pages` anyOf optional One of: **Forward Links** `last` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the last page of the results. `next` string optional Example: `https://api.digitalocean.com/v2/images?page=2` URI of the next page of the results. **Backward Links** `first` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the first page of the results. `prev` string optional Example: `https://api.digitalocean.com/v2/images?page=1` URI of the previous page of the results. `meta` object required **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "floating_ips": [ { "droplet": null, "ip": "45.55.96.47", "locked": false, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" } } ], "links": {}, "meta": { "total": 1 } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a New Floating IP `/v2/floating_ips` On creation, a floating IP must be either assigned to a Droplet or reserved to a region. - To create a new floating IP assigned to a Droplet, send a POST request to `/v2/floating_ips` with the `droplet_id` attribute. - To create a new floating IP reserved to a region, send a POST request to `/v2/floating_ips` with the `region` attribute. #### Request Body: `application/json` **Assign to Droplet** `droplet_id` integer required Example: `2457247` The ID of the Droplet that the floating IP will be assigned to. **Reserve to Region** `project_id` string (uuid) optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The UUID of the project to which the floating IP will be assigned. `region` string required Example: `nyc3` The slug identifier for the region the floating IP will be reserved to. ##### Request: `/v2/floating_ips` ### Payload Content type `application/json` ```json { "droplet_id": 2457247 } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"droplet_id": 123456}' \ "https://api.digitalocean.com/v2/floating_ips" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() createRequest := &godo.FloatingIPCreateRequest{ DropletID: 123456, } } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) floating_ip = DropletKit::FloatingIp.new(droplet_id: 123456) client.floating_ips.create(floating_ip) ``` #### Responses **202** The response will be a JSON object with a key called floating_ip. The value of this will be an object that contains the standard attributes associated with a floating IP. When assigning a floating IP to a Droplet at same time as it created, the response's links object will contain links to both the Droplet and the assignment action. The latter can be used to check the status of the action. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `floating_ip` object optional **Show child properties** `droplet` object optional The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null. Requires `droplet:read` scope. **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `v6` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `ip` string (ipv4) optional Example: `45.55.96.47` The public IP address of the floating IP. It also serves as its identifier. `locked` boolean optional Example: `true` A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted. `project_id` string (uuid) optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The UUID of the project to which the reserved IP currently belongs. Requires `project:read` scope. `region` object optional `links` object optional **Show child properties** `actions` array of object optional **Show child properties** `href` string (uri) optional Example: `https://api.digitalocean.com/v2/actions/7515` A URL that can be used to access the action. `id` integer optional Example: `7515` A unique numeric ID that can be used to identify and reference an action. `rel` string optional Example: `create` A string specifying the type of the related action. `droplets` array of object optional **Show child properties** `href` string (uri) optional Example: `https://api.digitalocean.com/v2/actions/7515` A URL that can be used to access the action. `id` integer optional Example: `7515` A unique numeric ID that can be used to identify and reference an action. `rel` string optional Example: `create` A string specifying the type of the related action. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **202** Example ```json { "floating_ip": { "droplet": null, "ip": "45.55.96.47", "locked": true, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" } }, "links": { "actions": [ { "href": "https://api.digitalocean.com/v2/actions/1088924622", "id": 1088924622, "rel": "assign_ip" } ], "droplets": [ { "href": "https://api.digitalocean.com/v2/droplets/213939433", "id": 213939433, "rel": "droplet" } ] } } ``` ```json { "floating_ip": { "droplet": null, "ip": "45.55.96.47", "locked": false, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" } }, "links": {} } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Retrieve an Existing Floating IP `/v2/floating_ips/{floating_ip}` To show information about a floating IP, send a GET request to `/v2/floating_ips/$FLOATING_IP_ADDR`. #### Path Parameters `floating_ip` string (ipv4) >= 1 required Example: `45.55.96.47` A floating IP address. ##### Request: `/v2/floating_ips/{floating_ip}` ### cURL ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() floatingIP, _, err := client.FloatingIPs.Get(ctx, "45.55.96.47") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.floating_ips.find(ip: '45.55.96.47') ``` #### Responses **200** The response will be a JSON object with a key called floating_ip. The value of this will be an object that contains the standard attributes associated with a floating IP. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `floating_ip` object optional **Show child properties** `droplet` object optional The Droplet that the floating IP has been assigned to. When you query a floating IP, if it is assigned to a Droplet, the entire Droplet object will be returned. If it is not assigned, the value will be null. Requires `droplet:read` scope. **Show child properties** `backup_ids` array of integer required Example: `[53893572]` An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. Requires `image:read` scope. `created_at` string (date-time) required Example: `2020-07-21T18:37:44Z` A time value given in ISO8601 combined date and time format that represents when the Droplet was created. `disk` integer required Example: `25` The size of the Droplet's disk in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to the Droplet. **Show child properties** `ephemeral` boolean optional Example: `false` Indicates an ephemeral (non-persistent) disk. `size` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `type` string, one of: local, boot, scratch optional Example: `local` The type of disk. All Droplets contain a `local` or `boot` disk. Additionally, GPU Droplets can also have a `scratch` disk for non-persistent data. `features` array of string required Example: `["backups","private_networking","ipv6"]` An array of features enabled on this Droplet. `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. **Show child properties** `count` integer optional Example: `1` The number of GPUs allocated to the Droplet. `fabric` boolean optional Example: `true` If GPU fabric networking is enabled. `model` string optional Example: `nvidia_h100` The model of the GPU. `vram` object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `id` integer required Example: `3164444` A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. `image` object required `kernel` object optional Deprecated Nullable **Note**: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to `null`. The current [kernel](https://docs.digitalocean.com/products/droplets/how-to/kernel/index.html.md) for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. **Show child properties** `id` integer optional Example: `7515` A unique number used to identify and reference a specific kernel. `name` string optional Example: `DigitalOcean GrubLoader v0.2 (20160714)` The display name of the kernel. This is shown in the web UI and is generally a descriptive title for the kernel in question. `version` string optional Example: `2016.07.13-DigitalOcean_loader_Ubuntu` A standard kernel version string representing the version, patch, and release information. `locked` boolean required Example: `false` A boolean value indicating whether the Droplet has been locked, preventing actions by users. `memory` integer required Example: `1024` Memory of the Droplet in megabytes. `name` string required Example: `example.com` The human-readable name set for the Droplet instance. `networks` object required The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. **Show child properties** `v4` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `v6` array of object optional *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `next_backup_window` object required `region` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created in this region. `features` array of string required Example: `["private_networking","backups","ipv6","metadata","install_agent","storage","image_transfer"]` This attribute is set to an array which contains features available in this region `name` string required Example: `New York 3` The display name of the region. This will be a full name that is used in the control panel and other interfaces. `sizes` array of string required This attribute is set to an array which contains the identifying slugs for the sizes available in this region. sizes:read is required to view. `slug` string required Example: `nyc3` A human-readable string that is used as a unique identifier for each region. `size` object required **Show child properties** `available` boolean required Example: `true` This is a boolean value that represents whether new Droplets can be created with this size. `description` string required Example: `Basic` A string describing the class of Droplets created from this size. For example: Basic, General Purpose, CPU-Optimized, Memory-Optimized, or Storage-Optimized. `disk` integer required Example: `25` The amount of disk space set aside for Droplets of this size. The value is represented in gigabytes. `disk_info` array of object optional An array of objects containing information about the disks available to Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `gpu_info` object optional An object containing information about the GPU capabilities of Droplets created with this size. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `memory` integer required Example: `1024` The amount of RAM allocated to Droplets created of this size. The value is represented in megabytes. `price_hourly` number (float) required Example: `0.00743999984115362` This describes the price of the Droplet size as measured hourly. The value is measured in US dollars. `price_monthly` number (float) required Example: `5` This attribute describes the monthly cost of this Droplet size if the Droplet is kept for an entire month. The value is measured in US dollars. `regions` array of string required Example: `["ams2","ams3","blr1","fra1","lon1","nyc1","nyc2","nyc3","sfo1","sfo2","sfo3","sgp1","tor1"]` An array containing the region slugs where this size is available for Droplet creates. `slug` string required Example: `s-1vcpu-1gb` A human-readable string that is used to uniquely identify each size. `transfer` number (float) required Example: `1` The amount of transfer bandwidth that is available for Droplets created in this size. This only counts traffic on the public interface. The value is given in terabytes. `vcpus` integer required Example: `1` The number of CPUs allocated to Droplets of this size. `size_slug` string required Example: `s-1vcpu-1gb` The unique slug identifier for the size of this Droplet. `snapshot_ids` array of integer required Example: `[67512819]` An array of snapshot IDs of any snapshots created from the Droplet instance. Requires `image:read` scope. `status` string, one of: new, active, off, archive required Example: `active` A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". `subnet_uuid` string optional Example: `9c7a0d63-3c4e-4d3d-9f56-3b0fb0e5e4a1` A string specifying the UUID of the VPC subnet to which the Droplet is assigned. Requires `vpc:read` scope. `tags` array of string required Example: `["web","env:prod"]` An array of Tags the Droplet has been tagged with. Requires `tag:read` scope. `vcpus` integer required Example: `1` The number of virtual CPUs. `volume_ids` array of string required Example: `["506f78a4-e098-11e5-ad9f-000f53306ae1"]` A flat array including the unique identifier for each Block Storage volume attached to the Droplet. Requires `block_storage:read` scope. `vpc_uuid` string optional Example: `760e09ef-dc84-11e8-981e-3cfdfeaae000` A string specifying the UUID of the VPC to which the Droplet is assigned. Requires `vpc:read` scope. `ip` string (ipv4) optional Example: `45.55.96.47` The public IP address of the floating IP. It also serves as its identifier. `locked` boolean optional Example: `true` A boolean value indicating whether or not the floating IP has pending actions preventing new ones from being submitted. `project_id` string (uuid) optional Example: `746c6152-2fa2-11ed-92d3-27aaa54e4988` The UUID of the project to which the reserved IP currently belongs. Requires `project:read` scope. `region` object optional **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "floating_ip": { "droplet": { "backup_ids": [ 53893572 ], "created_at": "2020-07-21T18:37:44Z", "disk": 25, "features": [ "backups", "private_networking", "ipv6" ], "id": 3164444, "image": { "created_at": "2020-05-15T05:47:50Z", "description": "", "distribution": "Ubuntu", "error_message": "", "id": 63663980, "min_disk_size": 20, "name": "20.04 (LTS) x64", "public": true, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "size_gigabytes": 2.36, "slug": "ubuntu-20-04-x64", "status": "available", "tags": [], "type": "base" }, "kernel": null, "locked": false, "memory": 1024, "name": "example.com", "networks": { "v4": [ { "gateway": "nil", "ip_address": "10.128.192.124", "netmask": "255.255.0.0", "type": "private" }, { "gateway": "192.241.165.1", "ip_address": "192.241.165.154", "netmask": "255.255.255.0", "type": "public" } ], "v6": [ { "gateway": "2604:a880:0:1010::1", "ip_address": "2604:a880:0:1010::18a:a001", "netmask": 64, "type": "public" } ] }, "next_backup_window": { "end": "2020-07-30T23:00:00Z", "start": "2020-07-30T00:00:00Z" }, "region": { "available": true, "features": [ "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" }, "size": { "available": true, "description": "Basic", "disk": 25, "memory": 1024, "price_hourly": 0.00743999984115362, "price_monthly": 5, "regions": [ "ams2", "ams3", "blr1", "fra1", "lon1", "nyc1", "nyc2", "nyc3", "sfo1", "sfo2", "sfo3", "sgp1", "tor1" ], "slug": "s-1vcpu-1gb", "transfer": 1, "vcpus": 1 }, "size_slug": "s-1vcpu-1gb", "snapshot_ids": [ 67512819 ], "status": "active", "tags": [ "web", "env:prod" ], "vcpus": 1, "volume_ids": [], "vpc_uuid": "760e09ef-dc84-11e8-981e-3cfdfeaae000" }, "ip": "45.55.96.47", "locked": false, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" } } } ``` ```json { "floating_ip": { "droplet": null, "ip": "45.55.96.47", "locked": false, "project_id": "746c6152-2fa2-11ed-92d3-27aaa54e4988", "region": { "available": true, "features": [ "private_networking", "backups", "ipv6", "metadata", "install_agent", "storage", "image_transfer" ], "name": "New York 3", "sizes": [ "s-1vcpu-1gb", "s-1vcpu-2gb", "s-1vcpu-3gb", "s-2vcpu-2gb", "s-3vcpu-1gb", "s-2vcpu-4gb", "s-4vcpu-8gb", "s-6vcpu-16gb", "s-8vcpu-32gb", "s-12vcpu-48gb", "s-16vcpu-64gb", "s-20vcpu-96gb", "s-24vcpu-128gb", "s-32vcpu-192g" ], "slug": "nyc3" } } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Floating IP `/v2/floating_ips/{floating_ip}` To delete a floating IP and remove it from your account, send a DELETE request to `/v2/floating_ips/$FLOATING_IP_ADDR`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. #### Path Parameters `floating_ip` string (ipv4) >= 1 required Example: `45.55.96.47` A floating IP address. ##### Request: `/v2/floating_ips/{floating_ip}` ### cURL ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/floating_ips/45.55.96.47" ``` ### Go ```go import ( "context" "os" "github.com/digitalocean/godo" ) func main() { token := os.Getenv("DIGITALOCEAN_TOKEN") client := godo.NewFromToken(token) ctx := context.TODO() _, err := client.FloatingIPs.Delete(ctx, "45.55.96.34") } ``` ### Ruby ```ruby require 'droplet_kit' token = ENV['DIGITALOCEAN_TOKEN'] client = DropletKit::Client.new(access_token: token) client.floating_ips.delete(ip: '45.55.96.47') ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Reserved IPs Pricing](https://docs.digitalocean.com/products/networking/reserved-ips/details/pricing/index.html.md), [How to Send Outbound Traffic Over a Reserved IP](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/outbound-traffic/index.html.md), [How to Reassign or Unassign Reserved IPs](https://docs.digitalocean.com/products/networking/reserved-ips/how-to/modify/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/functions/ --- title: Functions description: '[Serverless functions](https://docs.digitalocean.com/products/functions) are blocks of code that run on demand without the need to manage any …' product: Reference url: https://docs.digitalocean.com/reference/api/reference/functions/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Functions Generated on 4 Dec 2026 [Serverless functions](https://docs.digitalocean.com/products/functions) are blocks of code that run on demand without the need to manage any infrastructure. You can develop functions on your local machine and then deploy them to a namespace using `doctl`, the [official DigitalOcean CLI tool](https://docs.digitalocean.com/reference/doctl). The Serverless Functions API currently only supports creating and managing namespaces. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List Namespaces](#functions_list_namespaces) - **POST** [Create Namespace](#functions_create_namespace) - **GET** [Get Namespace](#functions_get_namespace) - **DELETE** [Delete Namespace](#functions_delete_namespace) - **GET** [List Triggers](#functions_list_triggers) - **POST** [Create Trigger](#functions_create_trigger) - **GET** [Get Trigger](#functions_get_trigger) - **PUT** [Update Trigger](#functions_update_trigger) - **DELETE** [Delete Trigger](#functions_delete_trigger) - **GET** [List Namespace Access Keys](#functionsAccessKey_list) - **POST** [Create a Namespace Access Key](#functionsAccessKey_create) - **PUT** [Update a Namespace Access Key](#functionsAccessKey_update) - **DELETE** [Delete a Namespace Access Key](#functionsAccessKey_delete) ## GET List Namespaces `/v2/functions/namespaces` **Authorizations: bearer_auth (2 scopes)** Http: Bearer Required scopes: function:read function:admin ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Returns a list of namespaces associated with the current user. To get all namespaces, send a GET request to `/v2/functions/namespaces`. ##### Request: `/v2/functions/namespaces` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.list_namespaces() ``` #### Responses **200** An array of JSON objects with a key called namespaces. Each object represents a namespace and contains the properties associated with it. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `namespaces` array of object optional **Show child properties** `api_host` string optional Example: `https://api_host.io` The namespace's API hostname. Each function in a namespace is provided an endpoint at the namespace's hostname. `created_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `key` string optional Example: `d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2` A random alpha numeric string. This key is used in conjunction with the namespace's UUID to authenticate a user to use the namespace via `doctl`, DigitalOcean's official CLI. `label` string optional Example: `my namespace` The namespace's unique name. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `region` string optional Example: `nyc1` The namespace's datacenter region. `updated_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `uuid` string optional Example: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The namespace's Universally Unique Identifier. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "namespaces": [ { "api_host": "https://api_host.io", "created_at": "2022-09-14T04:16:45Z", "key": "d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2", "label": "my namespace", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "region": "nyc1", "updated_at": "2022-09-14T04:16:45Z", "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Namespace `/v2/functions/namespaces` Creates a new serverless functions namespace in the desired region and associates it with the provided label. A namespace is a collection of functions and their associated packages, triggers, and project specifications. To create a namespace, send a POST request to `/v2/functions/namespaces` with the `region` and `label` properties. #### Request Body: `application/json` `label` string required Example: `my namespace` The namespace's unique name. `region` string required Example: `nyc1` The [datacenter region](https://docs.digitalocean.com/products/platform/availability-matrix/index.html.md#available-datacenters) in which to create the namespace. ##### Request: `/v2/functions/namespaces` ### Payload Content type `application/json` ```json { "label": "my namespace", "region": "nyc1" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"region": "nyc1", "label": "my namespace label"}' \ "https://api.digitalocean.com/v2/functions/namespaces" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "region": "nyc1", "label": "my namespace" } resp = client.functions.create_namespace(body=req) ``` #### Responses **200** A JSON response object with a key called namespace. The object contains the properties associated with the namespace. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `namespace` object optional **Show child properties** `api_host` string optional Example: `https://api_host.io` The namespace's API hostname. Each function in a namespace is provided an endpoint at the namespace's hostname. `created_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `key` string optional Example: `d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2` A random alpha numeric string. This key is used in conjunction with the namespace's UUID to authenticate a user to use the namespace via `doctl`, DigitalOcean's official CLI. `label` string optional Example: `my namespace` The namespace's unique name. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `region` string optional Example: `nyc1` The namespace's datacenter region. `updated_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `uuid` string optional Example: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The namespace's Universally Unique Identifier. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Limit Reached Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "namespace": { "api_host": "https://api_host.io", "created_at": "2022-09-14T04:16:45Z", "key": "d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2", "label": "my namespace", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "region": "nyc1", "updated_at": "2022-09-14T04:16:45Z", "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "bad_request", "message": "Invalid request payload: missing label field", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **422** ```json { "id": "unprocessable_entity", "message": "namespace limit reached", "request_id": "a3275238-3d04-4405-a123-55c389b406c0" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Namespace `/v2/functions/namespaces/{namespace_id}` Gets the namespace details for the given namespace UUID. To get namespace details, send a GET request to `/v2/functions/namespaces/$NAMESPACE_ID` with no parameters. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.get_namespace(namespace_id="aff93af3") ``` #### Responses **200** A JSON response object with a key called namespace. The object contains the properties associated with the namespace. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `namespace` object optional **Show child properties** `api_host` string optional Example: `https://api_host.io` The namespace's API hostname. Each function in a namespace is provided an endpoint at the namespace's hostname. `created_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `key` string optional Example: `d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2` A random alpha numeric string. This key is used in conjunction with the namespace's UUID to authenticate a user to use the namespace via `doctl`, DigitalOcean's official CLI. `label` string optional Example: `my namespace` The namespace's unique name. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `region` string optional Example: `nyc1` The namespace's datacenter region. `updated_at` string optional Example: `2022-09-14T04:16:45Z` UTC time string. `uuid` string optional Example: `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The namespace's Universally Unique Identifier. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** Not Allowed. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "namespace": { "api_host": "https://api_host.io", "created_at": "2022-09-14T04:16:45Z", "key": "d1zcd455h01mqjfs4s2eaewyejehi5f2uj4etqq3h7cera8iwkub6xg5of1wdde2", "label": "my namespace", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "region": "nyc1", "updated_at": "2022-09-14T04:16:45Z", "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "forbidden", "message": "not allowed to get namespace", "request_id": "b11e45a4-892c-48c9-9001-b6cffe9fe795" } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Namespace `/v2/functions/namespaces/{namespace_id}` Deletes the given namespace. When a namespace is deleted all assets, in the namespace are deleted, this includes packages, functions and triggers. Deleting a namespace is a destructive operation and assets in the namespace are not recoverable after deletion. Some metadata is retained, such as activations, or soft deleted for reporting purposes. To delete namespace, send a DELETE request to `/v2/functions/namespaces/$NAMESPACE_ID`. A successful deletion returns a 204 response. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.delete_namespace(namespace_id="aff93af3") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Triggers `/v2/functions/namespaces/{namespace_id}/triggers` Returns a list of triggers associated with the current user and namespace. To get all triggers, send a GET request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}/triggers` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.list_triggers(namespace_id="39f3ca") ``` #### Responses **200** An array of JSON objects with a key called namespaces. Each object represents a namespace and contains the properties associated with it. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `triggers` array of object optional **Show child properties** `created_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. `function` string optional Example: `hello` Name of function(action) that exists in the given namespace. `is_enabled` boolean optional Example: `true` Indicates weather the trigger is paused or unpaused. `name` string optional Example: `my trigger` The trigger's unique name within the namespace. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `scheduled_details` object optional Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. `scheduled_runs` object optional **Show child properties** `last_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates last run time. null value indicates trigger not run yet. `next_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates next run time. null value indicates trigger will not run. `type` string optional Example: `SCHEDULED` String which indicates the type of trigger source like SCHEDULED. `updated_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "triggers": [ { "created_at": "2022-11-11T04:16:45Z", "function": "hello", "is_enabled": true, "name": "my trigger", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "type": "SCHEDULED", "updated_at": "2022-11-11T04:16:45Z" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create Trigger `/v2/functions/namespaces/{namespace_id}/triggers` Creates a new trigger for a given function in a namespace. To create a trigger, send a POST request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers` with the `name`, `function`, `type`, `is_enabled` and `scheduled_details` properties. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. #### Request Body: `application/json` `function` string required Example: `hello` Name of function(action) that exists in the given namespace. `is_enabled` boolean required Example: `true` Indicates weather the trigger is paused or unpaused. `name` string required Example: `my trigger` The trigger's unique name within the namespace. `scheduled_details` object required Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. `type` string required Example: `SCHEDULED` One of different type of triggers. Currently only SCHEDULED is supported. ##### Request: `/v2/functions/namespaces/{namespace_id}/triggers` ### Payload Content type `application/json` ```json { "function": "hello", "is_enabled": true, "name": "my trigger", "scheduled_details": { "body": { "name": "Welcome to DO!" }, "cron": "* * * * *" }, "type": "SCHEDULED" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "my trigger", "function": "hello", "type": "SCHEDULED", "is_enabled": true, "scheduled_details": {"cron": "* * * * *", "body": {"name": "Welcome to DO!"}}}' \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "name": "my trigger", "function": "hello", "type": "SCHEDULED", "is_enabled": True, "scheduled_details": { "cron": "* * * * *", "body": { "name": "Welcome to DO!" } } } resp = client.functions.create_trigger(namespace_id="aff93af3", body=req) ``` #### Responses **200** A JSON response object with a key called trigger. The object contains the properties associated with the trigger. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `trigger` object optional **Show child properties** `created_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. `function` string optional Example: `hello` Name of function(action) that exists in the given namespace. `is_enabled` boolean optional Example: `true` Indicates weather the trigger is paused or unpaused. `name` string optional Example: `my trigger` The trigger's unique name within the namespace. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `scheduled_details` object optional Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. `scheduled_runs` object optional **Show child properties** `last_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates last run time. null value indicates trigger not run yet. `next_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates next run time. null value indicates trigger will not run. `type` string optional Example: `SCHEDULED` String which indicates the type of trigger source like SCHEDULED. `updated_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. **400** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** Limit Reached Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "trigger": { "created_at": "2022-11-11T04:16:45Z", "function": "hello", "is_enabled": true, "name": "my trigger", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "scheduled_details": { "cron": "* * * * *" }, "scheduled_runs": { "last_run_at": "2022-11-11T04:16:45Z", "next_run_at": "2022-11-11T04:16:45Z" }, "type": "SCHEDULED", "updated_at": "2022-11-11T04:16:45Z" } } ``` **400** ```json { "id": "bad_request", "message": "validating create trigger: validation error: missing trigger name, missing function name, missing source details", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **422** ```json { "id": "unprocessable_entity", "message": "triggers limit reached", "request_id": "7ba99a43-6618-4fe0-9af7-092752ad0d56" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get Trigger `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` Gets the trigger details. To get the trigger details, send a GET request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. `trigger_name` string required Example: `my trigger` The name of the trigger to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.get_trigger(namespace_id="aff93af3", trigger_name="trig_name") ``` #### Responses **200** A JSON response object with a key called trigger. The object contains the properties associated with the trigger. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `trigger` object optional **Show child properties** `created_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. `function` string optional Example: `hello` Name of function(action) that exists in the given namespace. `is_enabled` boolean optional Example: `true` Indicates weather the trigger is paused or unpaused. `name` string optional Example: `my trigger` The trigger's unique name within the namespace. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `scheduled_details` object optional Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. `scheduled_runs` object optional **Show child properties** `last_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates last run time. null value indicates trigger not run yet. `next_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates next run time. null value indicates trigger will not run. `type` string optional Example: `SCHEDULED` String which indicates the type of trigger source like SCHEDULED. `updated_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "trigger": { "created_at": "2022-11-11T04:16:45Z", "function": "hello", "is_enabled": true, "name": "my trigger", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "scheduled_details": { "cron": "* * * * *" }, "scheduled_runs": { "last_run_at": "2022-11-11T04:16:45Z", "next_run_at": "2022-11-11T04:16:45Z" }, "type": "SCHEDULED", "updated_at": "2022-11-11T04:16:45Z" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** Example ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` ```json { "id": "not_found", "message": "trigger not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update Trigger `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` Updates the details of the given trigger. To update a trigger, send a PUT request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME` with new values for the `is_enabled` or `scheduled_details` properties. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. `trigger_name` string required Example: `my trigger` The name of the trigger to be managed. #### Request Body: `application/json` `is_enabled` boolean optional Example: `true` Indicates weather the trigger is paused or unpaused. `scheduled_details` object optional Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. ##### Request: `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` ### Payload Content type `application/json` ```json { "is_enabled": true, "scheduled_details": { "body": { "name": "Welcome to DO!" }, "cron": "* * * * *" } } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"is_enabled": true, "scheduled_details": {"cron": "* * * * *", "body": {"name": "Welcome to DO!"}}}' \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) req = { "is_enabled": true, "scheduled_details": { "cron": "* * * * *", "body": { "name": "Welcome to DO!" } } } resp = client.functions.update_trigger(namespace_id="39f3ca", trigger_name="trig_name", body=req) ``` #### Responses **200** A JSON response object with a key called trigger. The object contains the properties associated with the trigger. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `trigger` object optional **Show child properties** `created_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. `function` string optional Example: `hello` Name of function(action) that exists in the given namespace. `is_enabled` boolean optional Example: `true` Indicates weather the trigger is paused or unpaused. `name` string optional Example: `my trigger` The trigger's unique name within the namespace. `namespace` string optional Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` A unique string format of UUID with a prefix fn-. `scheduled_details` object optional Trigger details for SCHEDULED type, where body is optional. **Show child properties** `body` object optional Nullable Optional data to be sent to function while triggering the function. **Show child properties** `name` string optional Example: `Welcome to DO!` `cron` string required Example: `* * * * *` valid cron expression string which is required for SCHEDULED type triggers. `scheduled_runs` object optional **Show child properties** `last_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates last run time. null value indicates trigger not run yet. `next_run_at` string optional Nullable Example: `2022-11-11T04:16:45Z` Indicates next run time. null value indicates trigger will not run. `type` string optional Example: `SCHEDULED` String which indicates the type of trigger source like SCHEDULED. `updated_at` string optional Example: `2022-11-11T04:16:45Z` UTC time string. **400** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "trigger": { "created_at": "2022-11-11T04:16:45Z", "function": "hello", "is_enabled": true, "name": "my trigger", "namespace": "fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "scheduled_details": { "cron": "* * * * *" }, "scheduled_runs": { "last_run_at": "2022-11-11T04:16:45Z", "next_run_at": "2022-11-11T04:16:45Z" }, "type": "SCHEDULED", "updated_at": "2022-11-11T04:16:45Z" } } ``` **400** ```json { "id": "bad_request", "message": "validating create trigger: validation error: missing trigger name, missing function name, missing source details", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** Example ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` ```json { "id": "not_found", "message": "trigger not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete Trigger `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` Deletes the given trigger. To delete trigger, send a DELETE request to `/v2/functions/namespaces/$NAMESPACE_ID/triggers/$TRIGGER_NAME`. A successful deletion returns a 204 response. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. `trigger_name` string required Example: `my trigger` The name of the trigger to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}/triggers/{trigger_name}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/{{namespace_id}}/triggers/{{trigger_name}}" ``` ### Python ```python import os from pydo import Client client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN")) resp = client.functions.delete_trigger(namespace_id="aff93af3", trigger_name="trig_name") ``` #### Responses **204** The action was successful and the response body is empty. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** Example ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` ```json { "id": "not_found", "message": "trigger not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List Namespace Access Keys `/v2/functions/namespaces/{namespace_id}/keys` Lists all access keys for a serverless functions namespace. To list access keys, send a GET request to `/v2/functions/namespaces/{namespace_id}/keys`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}/keys` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/keys" ``` #### Responses **200** A JSON response containing a list of access keys for the namespace. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `access_keys` array of object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2025-12-19T10:30:00Z` The date and time the key was created. `expires_at` string (date-time) optional read-only Nullable Example: `2026-12-19T10:30:00Z` When the key expires (null for non-expiring keys). `id` string optional read-only Example: `dof_v1_d79e8aeb42e5476893c7d4c59a166264` The access key's unique identifier with prefix 'dof_v1_'. `name` string optional Example: `my-function-access-key` The access key's name. `updated_at` string (date-time) optional read-only Example: `2025-12-19T10:30:00Z` The date and time the key was last updated. `count` integer optional Total number of access keys **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** Example ```json { "access_keys": [], "count": 0 } ``` ```json { "access_keys": [ { "created_at": "2025-12-19T10:30:00Z", "expires_at": "2026-12-19T10:30:00Z", "id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "my-function-access-key", "updated_at": "2025-12-19T10:30:00Z" }, { "created_at": "2025-11-15T08:00:00Z", "expires_at": null, "id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "my-function-access-key-2", "updated_at": "2025-11-15T08:00:00Z" } ], "count": 2 } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a Namespace Access Key `/v2/functions/namespaces/{namespace_id}/keys` Creates a new access key for a serverless functions namespace. The access key can be used to authenticate requests to the namespace's functions. The secret key is only returned once upon creation. To create an access key, send a POST request to `/v2/functions/namespaces/{namespace_id}/keys`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. #### Request Body: `application/json` `expires_in` string optional Example: `7d` The duration after which the access key expires, specified as a human-readable duration string in the format `h` (hours) or `d` (days). Minimum value is `1h`. If omitted, the key will never expire. `name` string required Example: `my-function-access-key` The access key's name. ##### Request: `/v2/functions/namespaces/{namespace_id}/keys` ### Payload Content type `application/json` Example ```json { "expires_in": "7d", "name": "my-function-access-key" } ``` ```json { "name": "my-function-access-key" } ``` ### cURL ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "my-function-access-key", "expires_in": "1h"}' \ "https://api.digitalocean.com/v2/functions/namespaces/fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/keys" ``` #### Responses **201** A JSON response containing details about the newly created access key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `access_key` object optional **400** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "access_key": { "created_at": "2025-12-19T10:30:00Z", "expires_at": "2026-12-19T10:30:00Z", "id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "my-function-access-key", "secret": "DOSECRETKEYEXAMPLE", "updated_at": "2025-12-19T10:30:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "Invalid request payload: missing label field", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PUT Update a Namespace Access Key `/v2/functions/namespaces/{namespace_id}/keys/{key_id}` Updates the name of an access key for a serverless functions namespace. To update an access key, send a PUT request to `/v2/functions/namespaces/{namespace_id}/keys/{key_id}`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. `key_id` string required Example: `dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the access key to be managed. #### Request Body: `application/json` `name` string required Example: `updated-key-name` The new name for the access key. ##### Request: `/v2/functions/namespaces/{namespace_id}/keys/{key_id}` ### Payload Content type `application/json` ```json { "name": "updated-key-name" } ``` ### cURL ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name": "updated-key-name"}' \ "https://api.digitalocean.com/v2/functions/namespaces/fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/keys/dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` #### Responses **200** A JSON response containing the updated access key details. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `access_key` object optional **Show child properties** `created_at` string (date-time) optional read-only Example: `2025-12-19T10:30:00Z` The date and time the key was created. `expires_at` string (date-time) optional read-only Nullable Example: `2026-12-19T10:30:00Z` When the key expires (null for non-expiring keys). `id` string optional read-only Example: `dof_v1_d79e8aeb42e5476893c7d4c59a166264` The access key's unique identifier with prefix 'dof_v1_'. `name` string optional Example: `my-function-access-key` The access key's name. `updated_at` string (date-time) optional read-only Example: `2025-12-19T10:30:00Z` The date and time the key was last updated. **400** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The request could not be completed due to a conflict. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "access_key": { "created_at": "2025-12-19T10:30:00Z", "expires_at": "2026-12-19T10:30:00Z", "id": "dof_v1-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "name": "updated-key-name", "updated_at": "2025-12-19T16:00:00Z" } } ``` **400** ```json { "id": "bad_request", "message": "Invalid request payload: missing label field", "request_id": "4851a473-1621-42ea-b2f9-5071c0ea8414" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **409** ```json { "id": "conflict", "message": "The request could not be completed due to a conflict." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a Namespace Access Key `/v2/functions/namespaces/{namespace_id}/keys/{key_id}` Deletes an access key for a serverless functions namespace. To delete an access key, send a DELETE request to `/v2/functions/namespaces/{namespace_id}/keys/{key_id}`. #### Path Parameters `namespace_id` string required Example: `fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the namespace to be managed. `key_id` string required Example: `dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` The ID of the access key to be managed. ##### Request: `/v2/functions/namespaces/{namespace_id}/keys/{key_id}` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/functions/namespaces/fn-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/keys/dof-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ``` #### Responses **200** Success. The access key was deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Bad Request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json {} ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "namespace not found", "request_id": "88d17b7a-630b-4083-99ce-5b91045efdb4" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * Learn more: [Functions Limits](https://docs.digitalocean.com/products/functions/details/limits/index.html.md), [Functions PHP Runtime](https://docs.digitalocean.com/products/functions/reference/runtimes/php/index.html.md), [How to Schedule Functions](https://docs.digitalocean.com/products/functions/how-to/schedule-functions/index.html.md) --- Source: https://docs.digitalocean.com/reference/api/reference/harness-runtime-workspaces-public-preview/ --- title: Harness Runtime Workspaces [Public Preview] description: Persistent workspaces (`/v2/harness-runtime/workspaces`) are sets of files that outlive a session. Attach one by passing `workspace_id` when you … product: Reference url: https://docs.digitalocean.com/reference/api/reference/harness-runtime-workspaces-public-preview/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Harness Runtime Workspaces \[Public Preview] Generated on 4 Dec 2026 Persistent workspaces (`/v2/harness-runtime/workspaces`) are sets of files that outlive a session. Attach one by passing `workspace_id` when you create a session from an Environment Config; it mounts at `/workspace`, a workspace is attached to one session at a time, and its files are saved when the session is removed or checkpointed. Fork and rollback are not available for a session with a workspace. Persistent workspaces are in public preview, free during public preview, and enabled per team; requests from other teams return `403`. Base URL `https://api.digitalocean.com` ## Endpoints - **GET** [List the team's persistent workspaces.](#harness_list_workspaces) - **POST** [Create a persistent workspace.](#harness_create_workspace) - **GET** [Get a persistent workspace.](#harness_get_workspace) - **DELETE** [Delete a persistent workspace.](#harness_delete_workspace) ## GET List the team's persistent workspaces. `/v2/harness-runtime/workspaces` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: agent_harness_session:read ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Lists the calling team's persistent workspaces, optionally only those in one state. A page can hold fewer results than page_size, so keep paging until next_page_token is empty. #### Query Parameters `page_size` integer (int32) >= 1 optional Example: `50` Page size. The server applies a default when omitted and clamps large values. `page_token` string optional Opaque cursor returned by the previous page. Empty starts from the beginning. `state` string (enum) optional Example: `AVAILABLE` Only list workspaces in this state. ##### Request: `/v2/harness-runtime/workspaces` ### bash ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces?state=AVAILABLE" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Opaque cursor for the next page. Empty when there are no further pages. A page can hold fewer results than page_size, so keep paging until this is empty. `workspaces` array of object optional **Show child properties** `attached_session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session that holds the workspace. Absent when no session does. `bytes_used` integer (int64) required Example: `1073741824` Estimated used space in bytes as of the last save. It can differ from the usage seen inside the session. `created_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When the workspace was created. `created_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user that created the workspace. `last_saved_at` string (date-time) optional Example: `2026-10-27T12:00:00Z` Time of the newest complete save. Absent until the first save. `name` string optional Example: `notes` Optional label. Not unique, and never accepted in place of workspace_id. `size_limit_gib` integer (int32) required Example: `10` Size limit in GiB, fixed at create. It is a quota, so the filesystem total inside the session is slightly lower. `state` string (enum) required Example: `AVAILABLE` Lifecycle state of a persistent workspace. `AVAILABLE`: ready to attach to a new session. `ATTACHING`: a session is being created with it. `ATTACHED`: a session is using it. `RELEASING`: the session was removed and the files are being saved. `FAILED`: the workspace could not be saved or created; it keeps its last successful save. `DELETING`: a delete is in progress. States may be added; treat an unknown value as unavailable. `updated_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When a user request last changed the workspace. Equal to created_at until then. Saves made by the platform do not change it. `updated_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user whose request last changed the workspace. Equal to created_by until then. `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` Assigned at create and never reused. Treat it as an opaque string. **400** Invalid page_token or state. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** Persistent workspaces are not enabled for this team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Persistent workspaces are not available yet. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** Workspace state is temporarily unavailable. Retry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "workspaces": [ { "attached_session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bytes_used": 1073741824, "created_at": "2026-10-27T11:00:00Z", "created_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "last_saved_at": "2026-10-27T12:00:00Z", "name": "notes", "size_limit_gib": 10, "state": "AVAILABLE", "updated_at": "2026-10-27T11:00:00Z", "updated_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } ] } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a persistent workspace. `/v2/harness-runtime/workspaces` Creates a persistent workspace with a fixed size limit. A workspace is a set of files with its own ID that is mounted at `/workspace` in the session it is attached to, and is kept when that session is removed. Attach it to a session by passing `workspace_id` when you create the session from an Environment Config. A new workspace returns `201`. A retry with the same `Idempotency-Key` and body within 24 hours returns the existing workspace with `200`. Persistent workspaces are in public preview, free during public preview, and enabled per team; for a team without access this returns `403`. #### Header Parameters `Idempotency-Key` string optional Example: `7f9c2ba4-e88f-4c2a-9d1e-0b6a1f3c5d21` Optional key that makes retries safe. Within 24 hours, the same key and body return the workspace the first request created, and the same key with a different body returns `422`. #### Request Body: `application/json` `name` string optional Example: `notes` Optional label of at most 255 characters. It does not need to be unique. `size_limit_gib` integer (int32) required Example: `10` Size limit of the workspace in GiB, from 1 to 100. A team limit can lower the maximum. The size cannot be changed after create. ##### Request: `/v2/harness-runtime/workspaces` ### Payload Content type `application/json` ```json { "name": "notes", "size_limit_gib": 10 } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -H "Idempotency-Key: 7f9c2ba4-e88f-4c2a-9d1e-0b6a1f3c5d21" \ -d '{"size_limit_gib":10,"name":"notes"}' \ "https://api.digitalocean.com/v2/harness-runtime/workspaces" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "notes", "size_limit_gib": 10 }' \ "https://api.digitalocean.com/v2/harness-runtime/workspaces" ``` #### Responses **200** Replay of an earlier create with the same Idempotency-Key and body; returns that workspace. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional A persistent workspace: a set of files with its own ID, mounted at `/workspace` in the one session it is attached to and kept when that session is removed. **Show child properties** `attached_session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session that holds the workspace. Absent when no session does. `bytes_used` integer (int64) required Example: `1073741824` Estimated used space in bytes as of the last save. It can differ from the usage seen inside the session. `created_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When the workspace was created. `created_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user that created the workspace. `last_saved_at` string (date-time) optional Example: `2026-10-27T12:00:00Z` Time of the newest complete save. Absent until the first save. `name` string optional Example: `notes` Optional label. Not unique, and never accepted in place of workspace_id. `size_limit_gib` integer (int32) required Example: `10` Size limit in GiB, fixed at create. It is a quota, so the filesystem total inside the session is slightly lower. `state` string (enum) required Example: `AVAILABLE` Lifecycle state of a persistent workspace. `AVAILABLE`: ready to attach to a new session. `ATTACHING`: a session is being created with it. `ATTACHED`: a session is using it. `RELEASING`: the session was removed and the files are being saved. `FAILED`: the workspace could not be saved or created; it keeps its last successful save. `DELETING`: a delete is in progress. States may be added; treat an unknown value as unavailable. `updated_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When a user request last changed the workspace. Equal to created_at until then. Saves made by the platform do not change it. `updated_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user whose request last changed the workspace. Equal to created_by until then. `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` Assigned at create and never reused. Treat it as an opaque string. **201** Workspace created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional A persistent workspace: a set of files with its own ID, mounted at `/workspace` in the one session it is attached to and kept when that session is removed. **Show child properties** `attached_session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session that holds the workspace. Absent when no session does. `bytes_used` integer (int64) required Example: `1073741824` Estimated used space in bytes as of the last save. It can differ from the usage seen inside the session. `created_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When the workspace was created. `created_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user that created the workspace. `last_saved_at` string (date-time) optional Example: `2026-10-27T12:00:00Z` Time of the newest complete save. Absent until the first save. `name` string optional Example: `notes` Optional label. Not unique, and never accepted in place of workspace_id. `size_limit_gib` integer (int32) required Example: `10` Size limit in GiB, fixed at create. It is a quota, so the filesystem total inside the session is slightly lower. `state` string (enum) required Example: `AVAILABLE` Lifecycle state of a persistent workspace. `AVAILABLE`: ready to attach to a new session. `ATTACHING`: a session is being created with it. `ATTACHED`: a session is using it. `RELEASING`: the session was removed and the files are being saved. `FAILED`: the workspace could not be saved or created; it keeps its last successful save. `DELETING`: a delete is in progress. States may be added; treat an unknown value as unavailable. `updated_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When a user request last changed the workspace. Equal to created_at until then. Saves made by the platform do not change it. `updated_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user whose request last changed the workspace. Equal to created_by until then. `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` Assigned at create and never reused. Treat it as an opaque string. **400** Invalid body, such as a missing or out-of-range size_limit_gib, a name longer than 255 characters, or an unknown field. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The request has no user identity, the team's account has been cleaned up, or persistent workspaces are not enabled for this team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Branch on the error id. Permanent until the team frees capacity: workspace_quota_exceeded (the team's workspace count or total size limit is reached; the message says which). Transient, retry in a moment with the same Idempotency-Key: idempotency_in_progress (the first request with this key is still running) or idempotency_resource_deleting (the key belongs to a workspace that is being deleted). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** idempotency_key_reused: the Idempotency-Key was already used with a different body. Permanent for this key; send the new request with a new key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Persistent workspaces are not available yet. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** The workspace could not be confirmed. Retry with the same Idempotency-Key. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "attached_session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bytes_used": 1073741824, "created_at": "2026-10-27T11:00:00Z", "created_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "last_saved_at": "2026-10-27T12:00:00Z", "name": "notes", "size_limit_gib": 10, "state": "AVAILABLE", "updated_at": "2026-10-27T11:00:00Z", "updated_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **201** ```json { "workspace": { "attached_session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bytes_used": 1073741824, "created_at": "2026-10-27T11:00:00Z", "created_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "last_saved_at": "2026-10-27T12:00:00Z", "name": "notes", "size_limit_gib": 10, "state": "AVAILABLE", "updated_at": "2026-10-27T11:00:00Z", "updated_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **422** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get a persistent workspace. `/v2/harness-runtime/workspaces/{workspace_id}` Returns one persistent workspace by its ID, including its state and when its files were last saved. Use it to wait for a workspace to return to `AVAILABLE` after the session that held it was removed. #### Path Parameters `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The workspace ID. Workspace names are not accepted. ##### Request: `/v2/harness-runtime/workspaces/{workspace_id}` ### bash ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces/019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces/{workspace_id}" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `workspace` object optional A persistent workspace: a set of files with its own ID, mounted at `/workspace` in the one session it is attached to and kept when that session is removed. **Show child properties** `attached_session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session that holds the workspace. Absent when no session does. `bytes_used` integer (int64) required Example: `1073741824` Estimated used space in bytes as of the last save. It can differ from the usage seen inside the session. `created_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When the workspace was created. `created_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user that created the workspace. `last_saved_at` string (date-time) optional Example: `2026-10-27T12:00:00Z` Time of the newest complete save. Absent until the first save. `name` string optional Example: `notes` Optional label. Not unique, and never accepted in place of workspace_id. `size_limit_gib` integer (int32) required Example: `10` Size limit in GiB, fixed at create. It is a quota, so the filesystem total inside the session is slightly lower. `state` string (enum) required Example: `AVAILABLE` Lifecycle state of a persistent workspace. `AVAILABLE`: ready to attach to a new session. `ATTACHING`: a session is being created with it. `ATTACHED`: a session is using it. `RELEASING`: the session was removed and the files are being saved. `FAILED`: the workspace could not be saved or created; it keeps its last successful save. `DELETING`: a delete is in progress. States may be added; treat an unknown value as unavailable. `updated_at` string (date-time) required Example: `2026-10-27T11:00:00Z` When a user request last changed the workspace. Equal to created_at until then. Saves made by the platform do not change it. `updated_by` string required Example: `3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6` UUID of the user whose request last changed the workspace. Equal to created_by until then. `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` Assigned at create and never reused. Treat it as an opaque string. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** Persistent workspaces are not enabled for this team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Persistent workspaces are not available yet. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** Workspace state is temporarily unavailable. Retry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "workspace": { "attached_session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "bytes_used": 1073741824, "created_at": "2026-10-27T11:00:00Z", "created_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "last_saved_at": "2026-10-27T12:00:00Z", "name": "notes", "size_limit_gib": 10, "state": "AVAILABLE", "updated_at": "2026-10-27T11:00:00Z", "updated_by": "3c5d7e9f-1a2b-4c6d-8e0f-a1b2c3d4e5f6", "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Delete a persistent workspace. `/v2/harness-runtime/workspaces/{workspace_id}` Permanently deletes a persistent workspace and its files. Only a workspace that is `AVAILABLE` or `FAILED` can be deleted; remove the session that holds it first. Workspaces are never deleted automatically. #### Path Parameters `workspace_id` string required Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The workspace ID. Workspace names are not accepted. ##### Request: `/v2/harness-runtime/workspaces/{workspace_id}` ### bash ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces/019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" ``` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/workspaces/{workspace_id}" ``` #### Responses **204** Workspace deleted; no response body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The request has no user identity, or persistent workspaces are not enabled for this team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The workspace is attached to a session, is still being saved, or cannot be deleted right now. Remove the session that holds it, or retry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Persistent workspaces are not available yet. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** Workspace state is temporarily unavailable. Retry. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * --- Source: https://docs.digitalocean.com/reference/api/reference/harness-runtime/ --- title: Harness Runtime description: DigitalOcean Harness Runtime API under `/v2/harness-runtime`. An environment is a reusable configuration that defines what an agent needs to do work; … product: Reference url: https://docs.digitalocean.com/reference/api/reference/harness-runtime/ --- > **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](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). # Harness Runtime Generated on 4 Dec 2026 DigitalOcean Harness Runtime API under `/v2/harness-runtime`. An environment is a reusable configuration that defines what an agent needs to do work; starting a session from an environment provisions an isolated sandbox. Define an environment with a YAML environment spec, or save it as an Environment Config and create sessions from `{name, config_id}`. Environment Configs (`/v2/harness-runtime/configs`) are immutable team-scoped configurations. Soft-delete releases the active name while keeping `config_id` resolvable for existing sessions; clone copies a sanitized environment under a new name (credentials are never copied). Checkpoints capture live sandbox machine state for fork and in-place rollback. Templates (`/v2/harness-runtime/templates`) manage team custom sandbox templates and their build history. Triggers (`/v2/harness-runtime/triggers`) fire an agent run on a webhook delivery or cron schedule, each firing recorded as an execution. The session event feed (`GET /v2/harness-runtime/sessions/{session_id}/events`) is a Server-Sent Events stream, and port-forward (`GET /v2/harness-runtime/sessions/{session_id}/port-forward/{port}`) opens a WebSocket tunnel to a guest port. `POST /v2/harness-runtime/sessions/{session_id}/cancel` stops the turn in flight. `GET /v2/harness-runtime/image-messages` lists sandbox-image notices on the team's sessions and checkpoints. `POST /v2/harness-runtime/auth/{provider}` starts the interactive provider login a session uses; `github` is the provider served today. Connections for that login are under `/v2/harness-runtime/auth/{provider}/connections`. Persistent workspaces (`/v2/harness-runtime/workspaces`) are in public preview and are described under Harness Runtime Workspaces \[Public Preview]. Base URL `https://api.digitalocean.com` ## Endpoints - **POST** [Start an interactive provider login for the team.](#harness_create_provider_connect) - **GET** [Check whether a provider login has finished.](#harness_get_provider_connect) - **GET** [List the team's connections for a provider.](#harness_list_provider_connections) - **POST** [Create a provider connection for one actor.](#harness_create_provider_connection) - **GET** [Read one provider connection.](#harness_get_provider_connection) - **DELETE** [Revoke a provider connection.](#harness_delete_provider_connection) - **POST** [Start a fresh login for an existing connection.](#harness_post_provider_connection_reconnect) - **GET** [List sandbox-image notices for the team.](#harness_list_image_messages) - **GET** [List active Environment Configs for the caller's team.](#harness_list_configs) - **POST** [Create an Environment Config (environment spec + optional Insights opt-in).](#harness_create_config) - **GET** [Get an active Environment Config and its environment spec.](#harness_get_config) - **DELETE** [Soft-delete an Environment Config.](#harness_delete_config) - **POST** [Clone an Environment Config under a new name.](#harness_create_config_clone) - **GET** [List the sessions created from one Environment Config.](#harness_list_config_sessions) - **GET** [ListRegions returns the regions the caller's team may create sessions and agent configs in.](#harness_list_regions) - **GET** [ListSessions enumerates sessions for the caller's tenant.](#harness_list_sessions) - **POST** [CreateSession provisions a sandbox and starts a Harness Runtime session.](#harness_create_session) - **POST** [ValidatePolicy checks a manifest's tool-permission policy against the agent's capabilities without creating a session.](#harness_validate_session_policy) - **GET** [ListSandboxSizes returns the customer-selectable sandbox (microVM) size catalog.](#harness_list_session_sandbox_sizes) - **GET** [GetSession returns the current snapshot of a session.](#harness_get_session) - **PATCH** [Update a session's settings.](#harness_update_session) - **DELETE** [DestroySession tears down the sandbox and marks the session DESTROYED.](#harness_delete_session) - **GET** [ListCheckpoints enumerates a session's checkpoints, newest first.](#harness_list_session_checkpoints) - **POST** [CreateCheckpoint captures the session's live sandbox state as a durable checkpoint.](#harness_create_session_checkpoint) - **GET** [GetCheckpoint returns the current snapshot of a checkpoint.](#harness_get_session_checkpoint) - **DELETE** [DeleteCheckpoint removes a checkpoint and its underlying machine-state capture.](#harness_delete_session_checkpoint) - **GET** [Read sandbox-image notices for one checkpoint.](#harness_get_checkpoint_image_messages) - **POST** [RollbackToCheckpoint rewinds a session to a checkpoint.](#harness_revert_session_checkpoint) - **POST** [ForkSession creates child sessions from a checkpoint of this session.](#harness_create_session_fork) - **POST** [ResolveHITL records the user's decision on a pending HITL request.](#harness_post_session_hitl) - **POST** [Cancel the agent turn in flight.](#harness_cancel_session_turn) - **GET** [Read sandbox-image notices for one session.](#harness_get_session_image_messages) - **POST** [SendInput delivers a user chat message into the session.](#harness_create_session_input) - **POST** [PauseSession freezes the session's microVM sandbox.](#harness_post_session_pause) - **POST** [ResumeSession explicitly thaws a PAUSED session's microVM sandbox.](#harness_post_session_resume) - **POST** [ExecInSandbox runs a one-shot command inside the session's sandbox.](#harness_post_session_sandbox_exec) - **POST** [Write one chunk of stdin to a command started with keep_stdin_open.](#harness_post_session_sandbox_exec_stdin) - **GET** [Download a file or tar archive from the session's sandbox workspace.](#harness_get_session_workspace_download) - **POST** [Start a staged (large-file) workspace transfer.](#harness_create_session_workspace_transfer) - **GET** [Get the status of a staged workspace transfer.](#harness_get_session_workspace_transfer) - **POST** [Cancel a staged workspace transfer.](#harness_cancel_session_workspace_transfer) - **POST** [Finalize a staged upload.](#harness_commit_session_workspace_transfer) - **POST** [Mint presigned PUT URLs for one or more multipart upload parts.](#harness_create_session_workspace_part_upload_urls) - **POST** [Upload a file or tar archive into the session's sandbox workspace.](#harness_create_session_workspace_upload) - **GET** [StreamSessionEvents opens the session's Server-Sent Events feed.](#harness_get_session_events) - **GET** [PortForwardSession opens a WebSocket tunnel to a guest TCP port.](#harness_get_session_port_forward) - **GET** [GetIngressURL returns the public HTTPS URL of the session's OpenHands Agent Server.](#harness_get_session_ingress) - **GET** [ListTeamTemplates returns the caller's team custom templates.](#harness_list_templates) - **POST** [CreateTemplate creates a team custom template and kicks a build.](#harness_create_template) - **GET** [GetTemplate returns a team custom template by public id.](#harness_get_template) - **PUT** [UpdateTemplate updates a team template's source and kicks a new build.](#harness_update_template) - **DELETE** [DeleteTemplate deletes a team custom template.](#harness_delete_template) - **GET** [ListTemplateBuilds returns build history for a template.](#harness_list_template_builds) - **GET** [GetTemplateBuild returns a single template build.](#harness_get_template_build) - **GET** [ListTriggers enumerates the calling team's triggers.](#harness_list_triggers) - **POST** [CreateTrigger creates a webhook or cron trigger.](#harness_create_trigger) - **GET** [Get the newest trigger bound to a session, or the trigger of its newest execution.](#harness_get_trigger_by_session) - **GET** [ListReusableSessions lists the team's PAUSED sessions for the reuse picker.](#harness_list_reusable_sessions) - **GET** [GetTrigger returns a single trigger by id.](#harness_get_trigger) - **PATCH** [UpdateTrigger updates, pauses, or re-enables a trigger.](#harness_update_trigger) - **DELETE** [DeleteTrigger soft-deletes a trigger.](#harness_delete_trigger) - **GET** [ListTriggerExecutions returns a trigger's execution history.](#harness_list_trigger_executions) - **GET** [GetTriggerExecution returns a single execution, including its payload.](#harness_get_trigger_execution) - **POST** [CancelExecution ends a running execution and frees the trigger's in-flight slot.](#harness_cancel_trigger_execution) - **POST** [RotateTriggerSecret issues a new webhook secret.](#harness_post_trigger_rotate_secret) - **POST** [ReceiveTriggerWebhook accepts a signed delivery from an external system.](#harness_post_trigger_webhook) - **GET** [ListWebhookProviders lists supported webhook providers for the create-trigger UI.](#harness_list_webhook_providers) ## POST Start an interactive provider login for the team. `/v2/harness-runtime/auth/{provider}` **Authorizations: bearer_auth (1 scope)** Http: Bearer Required scopes: agent_harness_session:create ### OAuth Authentication In order to interact with the DigitalOcean API, you or your application must authenticate. The DigitalOcean API handles this through OAuth, an open standard for authorization. OAuth allows you to delegate access to your account. Scopes can be used to grant full access, read-only access, or access to a specific set of endpoints. You can generate an OAuth token by visiting the [Apps & API](https://cloud.digitalocean.com/account/api/tokens?utm_source=docs-agent&utm_medium=md) section of the DigitalOcean control panel for your account. An OAuth token functions as a complete authentication request. In effect, it acts as a substitute for a username and password pair. Because of this, it is absolutely **essential** that you keep your OAuth tokens secure. In fact, upon generation, the web interface will only display each token a single time in order to prevent the token from being compromised. DigitalOcean access tokens begin with an identifiable prefix in order to distinguish them from other similar tokens. - `dop_v1_` for personal access tokens generated in the control panel - `doo_v1_` for tokens generated by applications using [the OAuth flow](https://docs.digitalocean.com/reference/api/oauth-api/index.html.md) - `dor_v1_` for OAuth refresh tokens #### Scopes Scopes act like permissions assigned to an API token. These permissions determine what actions the token can perform. You can create API tokens that grant read-only access, full access, or limited access to specific endpoints by using custom scopes. Generally, scopes are designed to match HTTP verbs and common CRUD operations (Create, Read, Update, Delete). | HTTP Verb | CRUD Operation | Scope | |---|---|---| | GET | Read | `:read` | | POST | Create | `:create` | | PUT/PATCH | Update | `:update` | | DELETE | Delete | `:delete` | For example, creating a new Droplet by making a `POST` request to the `/v2/droplets` endpoint requires the `droplet:create` scope while listing Droplets by making a `GET` request to the `/v2/droplets` endpoint requires the `droplet:read` scope. Each endpoint below specifies which scope is required to access it when using custom scopes. #### How to Authenticate with OAuth In order to make an authenticated request, include a bearer-type `Authorization` header containing your OAuth token. All requests must be made over HTTPS. #### Authenticate with a Bearer Authorization Header ``` curl -X $HTTP_METHOD -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" "https://api.digitalocean.com/v2/$OBJECT" ``` Starts, or resumes, the one-time login the team uses so a session can act on a provider. `github` is the provider served today; any other value returns 501. The body is optional. When the team is already connected, `status` is `success` and no URL is returned. Otherwise `status` is `requires_authorization` and the response carries the URL, verification code, and poll URL for the interactive step. No token or authorization handle is returned. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. #### Request Body: `application/json` `force_reconnect` boolean optional Example: `false` When true, start a new login even if the team is already connected. ##### Request: `/v2/harness-runtime/auth/{provider}` ### Payload Content type `application/json` ```json { "force_reconnect": false } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"force_reconnect":false}' \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "force_reconnect": false }' \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}" ``` #### Responses **200** Login started, or already complete. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `connect_url` string optional Example: `https://example.invalid/connect` Where to send the user. Omitted once status is success. `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` When the interactive step expires. Omitted when there is nothing to expire. `poll_url` string optional Example: `https://example.invalid/poll` Pass this to the poll call. Omitted once status is success. `provider` string optional Example: `github` `status` string, one of: success, requires_authorization optional Example: `requires_authorization` success when a credential already exists. requires_authorization when the user must finish the interactive step at connect_url. `verification_code` string optional Example: `ABCD-1234` Code the user confirms during the interactive step. Omitted once status is success. **400** The body is present and is not the documented JSON object. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider login is not enabled, or this provider is not served. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "connect_url": "https://example.invalid/connect", "expires_at": "2026-07-27T12:00:00Z", "poll_url": "https://example.invalid/poll", "provider": "github", "status": "requires_authorization", "verification_code": "ABCD-1234" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Check whether a provider login has finished. `/v2/harness-runtime/auth/{provider}/poll` Pass the `poll_url` from the start response. The response reports only whether login has finished. No token or authorization handle is returned. `github` is the provider served today. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. #### Query Parameters `poll_url` string required Example: `https://example.invalid/poll` The `poll_url` returned by the start call. ##### Request: `/v2/harness-runtime/auth/{provider}/poll` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/poll?poll_url=https%3A%2F%2Fexample.invalid%2Fpoll" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/poll?poll_url=https%3A%2F%2Fexample.invalid%2Fpoll" ``` #### Responses **200** Current login status. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `provider` string optional Example: `github` `status` string, one of: success, requires_authorization optional Example: `success` success when login has finished. requires_authorization while it is still outstanding. **400** poll_url is missing. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider login is not enabled, or this provider is not served. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "expires_at": "2026-07-27T12:00:00Z", "provider": "github", "status": "success" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List the team's connections for a provider. `/v2/harness-runtime/auth/{provider}/connections` One page of connections the team holds for `{provider}`. `user_id` is the actor identifier the connection acts for, not a DigitalOcean user id. A list never includes revoked connections and never includes a token. `github` is the provider served today. Page defaults are the upstream connection service's own (20 per page, at most 100). #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. #### Query Parameters `user_id` string optional Example: `octocat` Return only the connection for this actor identifier. `status` string optional Example: `active` Filter by connection status. Known values are `pending`, `active`, and `expired`. `page` integer (int32) >= 0 optional Example: `1` Page number. Omit it or pass `0` to use the upstream default. A negative value is rejected. `per_page` integer (int32) >= 0 optional Example: `20` Page size. Omit it or pass `0` to use the upstream default of 20. Values above 100 are capped. A negative value is rejected. ##### Request: `/v2/harness-runtime/auth/{provider}/connections` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections" ``` #### Responses **200** One page of connections. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `connections` array of object optional **Show child properties** `created_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `deletion_protected` boolean optional Example: `false` True when an ordinary delete will be refused because an environment config uses it. `id` string optional Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` `oauth` object optional The grant on an OAuth connection. Absent for a connection that has no grant. **Show child properties** `granted_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `scopes` array of string optional Example: `["repo"]` `owning_user_id` string optional Example: `b1c2d3e4-f5a6-7890-abcd-ef1234567890` DigitalOcean user id of the member who created the connection, when recorded. `provider` string optional Example: `github` `provider_display_name` string optional Example: `GitHub` `status` string optional Example: `active` pending, active, revoked, or expired. A list does not include revoked connections. `updated_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `user_id` string optional Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. `pagination` object optional **Show child properties** `page` integer (int32) optional Example: `1` `per_page` integer (int32) optional Example: `20` `total` integer (int32) optional Example: `1` **400** page or per_page is not an integer, or is negative. Zero is accepted and treated as omitted. Values of per_page above 100 are capped, not rejected. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider connections are not enabled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "connections": [ { "created_at": "2026-07-27T12:00:00Z", "deletion_protected": false, "id": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c", "owning_user_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890", "provider": "github", "provider_display_name": "GitHub", "status": "active", "updated_at": "2026-07-27T12:00:00Z", "user_id": "octocat" } ], "pagination": { "page": 1, "per_page": 20, "total": 1 } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create a provider connection for one actor. `/v2/harness-runtime/auth/{provider}/connections` Creates the connection `{provider}` will use for `user_id`. `user_id` is the actor identifier the connection acts for, not a DigitalOcean user id. Each actor has at most one active, pending, or expired connection per provider. If `user_id` already has one, the request fails with `409`. Find that connection's id with `GET /v2/harness-runtime/auth/{provider}/connections?user_id=...`, then resume or restart it with `POST /v2/harness-runtime/auth/{provider}/connections/{connection_id}/reconnect`, which keeps its scopes. Revoked connections do not count toward the limit, and list responses omit them. If the only connection `user_id` has for `{provider}` is revoked, for example by `DELETE`, create starts it again under the same connection id, with the scopes in this request. To change a connection's scopes, delete it and then create it. A successful create returns the connection as `pending`, with an `authorization` object for the interactive step. No token is returned. `github` is the provider served today. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. #### Request Body: `application/json` `scopes` array of string optional Example: `["repo"]` `user_id` string required Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. ##### Request: `/v2/harness-runtime/auth/{provider}/connections` ### Payload Content type `application/json` ```json { "scopes": [ "repo" ], "user_id": "octocat" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"user_id":"octocat"}' \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "scopes": [ "repo" ], "user_id": "octocat" }' \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections" ``` #### Responses **200** The new connection, pending, with the authorization steps the user has to complete. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Interactive step a pending connection still needs. Omitted when the connection is active. **Show child properties** `connect_url` string optional Example: `https://example.invalid/connect` `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `status` string optional Example: `requires_authorization` `verification_code` string optional Example: `ABCD-1234` `connection` object optional One provider connection. Identifiers only — no token or authorization handle. **Show child properties** `created_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `deletion_protected` boolean optional Example: `false` True when an ordinary delete will be refused because an environment config uses it. `id` string optional Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` `oauth` object optional The grant on an OAuth connection. Absent for a connection that has no grant. **Show child properties** `granted_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `scopes` array of string optional Example: `["repo"]` `owning_user_id` string optional Example: `b1c2d3e4-f5a6-7890-abcd-ef1234567890` DigitalOcean user id of the member who created the connection, when recorded. `provider` string optional Example: `github` `provider_display_name` string optional Example: `GitHub` `status` string optional Example: `active` pending, active, revoked, or expired. A list does not include revoked connections. `updated_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `user_id` string optional Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. **400** The body is missing, is not the documented JSON object, or omits user_id. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** user_id already has an active, pending, or expired connection for {provider}. List the connections filtered by user_id to find its id, then reconnect it. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider connections are not enabled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": { "connect_url": "https://example.invalid/connect", "expires_at": "2026-07-27T12:00:00Z", "status": "requires_authorization", "verification_code": "ABCD-1234" }, "connection": { "created_at": "2026-07-27T12:00:00Z", "deletion_protected": false, "id": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c", "oauth": { "granted_at": "2026-07-27T12:00:00Z", "scopes": [ "repo" ] }, "owning_user_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890", "provider": "github", "provider_display_name": "GitHub", "status": "active", "updated_at": "2026-07-27T12:00:00Z", "user_id": "octocat" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Read one provider connection. `/v2/harness-runtime/auth/{provider}/connections/{connection_id}` Returns one connection. Poll a pending connection with this call until `authorization` is absent. A connection that belongs to another provider than `{provider}` is 404. No token is returned. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. `connection_id` string required Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` The connection id. ##### Request: `/v2/harness-runtime/auth/{provider}/connections/{connection_id}` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}" ``` #### Responses **200** The connection, plus authorization steps when it is still pending. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Interactive step a pending connection still needs. Omitted when the connection is active. **Show child properties** `connect_url` string optional Example: `https://example.invalid/connect` `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `status` string optional Example: `requires_authorization` `verification_code` string optional Example: `ABCD-1234` `connection` object optional One provider connection. Identifiers only — no token or authorization handle. **Show child properties** `created_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `deletion_protected` boolean optional Example: `false` True when an ordinary delete will be refused because an environment config uses it. `id` string optional Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` `oauth` object optional The grant on an OAuth connection. Absent for a connection that has no grant. **Show child properties** `granted_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `scopes` array of string optional Example: `["repo"]` `owning_user_id` string optional Example: `b1c2d3e4-f5a6-7890-abcd-ef1234567890` DigitalOcean user id of the member who created the connection, when recorded. `provider` string optional Example: `github` `provider_display_name` string optional Example: `GitHub` `status` string optional Example: `active` pending, active, revoked, or expired. A list does not include revoked connections. `updated_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `user_id` string optional Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider connections are not enabled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": { "connect_url": "https://example.invalid/connect", "expires_at": "2026-07-27T12:00:00Z", "status": "requires_authorization", "verification_code": "ABCD-1234" }, "connection": { "created_at": "2026-07-27T12:00:00Z", "deletion_protected": false, "id": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c", "oauth": { "granted_at": "2026-07-27T12:00:00Z", "scopes": [ "repo" ] }, "owning_user_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890", "provider": "github", "provider_display_name": "GitHub", "status": "active", "updated_at": "2026-07-27T12:00:00Z", "user_id": "octocat" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Revoke a provider connection. `/v2/harness-runtime/auth/{provider}/connections/{connection_id}` Revokes the connection and returns it. A connection that an environment config still uses is left in place and the error names those configs. There is no force flag on this route. A connection under a different provider than `{provider}` is 404. No token is returned. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. `connection_id` string required Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` The connection id. ##### Request: `/v2/harness-runtime/auth/{provider}/connections/{connection_id}` ### bash ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}" ``` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}" ``` #### Responses **200** The revoked connection. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Interactive step a pending connection still needs. Omitted when the connection is active. **Show child properties** `connect_url` string optional Example: `https://example.invalid/connect` `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `status` string optional Example: `requires_authorization` `verification_code` string optional Example: `ABCD-1234` `connection` object optional One provider connection. Identifiers only — no token or authorization handle. **Show child properties** `created_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `deletion_protected` boolean optional Example: `false` True when an ordinary delete will be refused because an environment config uses it. `id` string optional Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` `oauth` object optional The grant on an OAuth connection. Absent for a connection that has no grant. **Show child properties** `granted_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `scopes` array of string optional Example: `["repo"]` `owning_user_id` string optional Example: `b1c2d3e4-f5a6-7890-abcd-ef1234567890` DigitalOcean user id of the member who created the connection, when recorded. `provider` string optional Example: `github` `provider_display_name` string optional Example: `GitHub` `status` string optional Example: `active` pending, active, revoked, or expired. A list does not include revoked connections. `updated_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `user_id` string optional Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** An environment config still uses this connection, or that check could not be completed. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider connections are not enabled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": { "connect_url": "https://example.invalid/connect", "expires_at": "2026-07-27T12:00:00Z", "status": "requires_authorization", "verification_code": "ABCD-1234" }, "connection": { "created_at": "2026-07-27T12:00:00Z", "deletion_protected": false, "id": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c", "oauth": { "granted_at": "2026-07-27T12:00:00Z", "scopes": [ "repo" ] }, "owning_user_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890", "provider": "github", "provider_display_name": "GitHub", "status": "active", "updated_at": "2026-07-27T12:00:00Z", "user_id": "octocat" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Start a fresh login for an existing connection. `/v2/harness-runtime/auth/{provider}/connections/{connection_id}/reconnect` Resumes a pending connection's authorization, or starts a new one for an expired or revoked connection. The connection keeps its id, `user_id`, and scopes, so environments that use it keep working once it is active again. An active connection is returned unchanged. Only the member who owns the connection can reconnect it; for anyone else the response is `404`, the same as for an unknown connection. The response includes `authorization` while the interactive step is outstanding. No token is returned. #### Path Parameters `provider` string required Example: `github` Provider key. `github` is the provider served today. `connection_id` string required Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` The connection id. ##### Request: `/v2/harness-runtime/auth/{provider}/connections/{connection_id}/reconnect` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}/reconnect" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/harness-runtime/auth/{provider}/connections/{connection_id}/reconnect" ``` #### Responses **200** The connection, plus authorization steps when login is still outstanding. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `authorization` object optional Interactive step a pending connection still needs. Omitted when the connection is active. **Show child properties** `connect_url` string optional Example: `https://example.invalid/connect` `expires_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `status` string optional Example: `requires_authorization` `verification_code` string optional Example: `ABCD-1234` `connection` object optional One provider connection. Identifiers only — no token or authorization handle. **Show child properties** `created_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `deletion_protected` boolean optional Example: `false` True when an ordinary delete will be refused because an environment config uses it. `id` string optional Example: `3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c` `oauth` object optional The grant on an OAuth connection. Absent for a connection that has no grant. **Show child properties** `granted_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `scopes` array of string optional Example: `["repo"]` `owning_user_id` string optional Example: `b1c2d3e4-f5a6-7890-abcd-ef1234567890` DigitalOcean user id of the member who created the connection, when recorded. `provider` string optional Example: `github` `provider_display_name` string optional Example: `GitHub` `status` string optional Example: `active` pending, active, revoked, or expired. A list does not include revoked connections. `updated_at` string (date-time) optional Example: `2026-07-27T12:00:00Z` `user_id` string optional Example: `octocat` Actor identifier the connection acts for. Not a DigitalOcean user id. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Provider connections are not enabled. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "authorization": { "connect_url": "https://example.invalid/connect", "expires_at": "2026-07-27T12:00:00Z", "status": "requires_authorization", "verification_code": "ABCD-1234" }, "connection": { "created_at": "2026-07-27T12:00:00Z", "deletion_protected": false, "id": "3f2a1b0c-9d8e-7f6a-5b4c-3d2e1f0a9b8c", "oauth": { "granted_at": "2026-07-27T12:00:00Z", "scopes": [ "repo" ] }, "owning_user_id": "b1c2d3e4-f5a6-7890-abcd-ef1234567890", "provider": "github", "provider_display_name": "GitHub", "status": "active", "updated_at": "2026-07-27T12:00:00Z", "user_id": "octocat" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List sandbox-image notices for the team. `/v2/harness-runtime/image-messages` Returns the caller's sessions and checkpoints whose sandbox image carries a live notice. Pass `session_name` or `checkpoint_name` to look up one resource; those two parameters cannot be set together, and `page_size` / `page_token` are ignored when either is set. Without a name, the list is keyset-paginated. `type` filters the notice kind; the only documented value is `vulnerability`. Triggers are not listed here — a trigger runs on a session, so ask about that session. #### Query Parameters `type` string, one of: vulnerability optional Example: `vulnerability` Notice type. Omit it to return every type. The only documented value is `vulnerability`. `session_name` string optional Example: `support-agent` Exact session name. Returns one resource for that session. Cannot be combined with `checkpoint_name`. `checkpoint_name` string optional Example: `before-upgrade` Exact checkpoint name. Returns one resource for that checkpoint. Cannot be combined with `session_name`. `page_size` integer (int32) optional Example: `50` Page size when listing. Defaults to 50 when omitted or not positive; values above 200 are clamped to 200. A non-integer is rejected. Ignored when `session_name` or `checkpoint_name` is set. Default: `50` `page_token` string optional Opaque cursor from the previous page. Empty starts at the beginning. A value that did not come from a previous page is rejected. Ignored when `session_name` or `checkpoint_name` is set. ##### Request: `/v2/harness-runtime/image-messages` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/image-messages" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/image-messages" ``` #### Responses **200** Notices for the team's matching sessions and checkpoints. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Opaque cursor for the next page. Empty on the last page and on a single-resource lookup. `resources` array of object optional **Show child properties** `checkpoint_id` string optional Example: `cp_example` `checkpoint_name` string optional Example: `before-upgrade` `image_id` string optional Example: `img_example` `kind` string, one of: SESSION, CHECKPOINT optional Example: `SESSION` `messages` array of object optional **Show child properties** `message` string optional Example: `This sandbox image has a published fix.` `more_info_url` string optional Example: `https://docs.digitalocean.com/products/gradient-ai-platform/` `title` string optional Example: `Image update available` `type` string optional Example: `vulnerability` Notice kind. The documented value is vulnerability. `resolution_complete` boolean optional Example: `true` `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `session_name` string optional Example: `support-agent` `vulnerable` boolean optional Example: `false` **400** Unknown type, a non-integer page_size, a malformed page_token, or both session_name and checkpoint_name set. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Image messages are not available on this deployment. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "", "resources": [ { "checkpoint_id": "cp_example", "checkpoint_name": "before-upgrade", "image_id": "img_example", "kind": "SESSION", "messages": [], "resolution_complete": true, "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "session_name": "support-agent", "vulnerable": false } ] } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List active Environment Configs for the caller's team. `/v2/harness-runtime/configs` Returns lightweight team-scoped config metadata without loading or returning environment-spec JSON. Soft-deleted configs are excluded. #### Query Parameters `page_size` integer (int32) 1 – 200 optional Example: `50` Page size. Defaults to 50 when omitted. Values above 200 are rejected. Default: `50` `page_token` string optional Opaque keyset cursor returned by the previous page. `search` string optional Example: `support` Optional case-insensitive substring filter on config name (contains). Empty or omitted returns the unfiltered page. At most 64 characters. ##### Request: `/v2/harness-runtime/configs` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs" ``` #### Responses **200** A page of active Environment Configs. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `configs` array of object optional **Show child properties** `agentspec_schema_version` string required Example: `agents.digitalocean.com/v1alpha1` The manifest contract the server accepted at create time: the manifest's own apiVersion for legacy envelope parses (currently agents.digitalocean.com/v1alpha1), or agents.digitalocean.com/flat.v1 for flat-format parses. `content_hash` string required Example: `75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4` Lowercase SHA-256 hex digest of the canonical sanitized manifest JSON. `created_at` string (date-time) required Example: `2026-08-01T12:00:00Z` `created_by` string required Example: `user-1` Authenticated user identity that created the config. `id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` `name` string required Example: `support-agent` `region` string optional Example: `ric1` DO region slug the config lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `updated_at` string (date-time) required Example: `2026-08-01T12:00:00Z` `next_page_token` string optional **400** Invalid pagination input. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "configs": [ { "agentspec_schema_version": "agents.digitalocean.com/v1alpha1", "content_hash": "75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4", "created_at": "2026-08-01T12:00:00Z", "created_by": "user-1", "id": "019fb39c-14d9-7080-933e-b9b90e25acda", "name": "support-agent", "region": "ric1", "updated_at": "2026-08-01T12:00:00Z" } ], "next_page_token": "" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Create an Environment Config (environment spec + optional Insights opt-in). `/v2/harness-runtime/configs` Accepts name, environment-spec YAML text, and optional Insights telemetry opt-in. Tenant secrets are declared inside the environment spec (write-only values), not as sibling request fields. Responses never echo secret values; GET/create may include credential slot metadata (name/source/provider only). Configs are immutable after create. #### Request Body: `application/json` Environment Config create body. Secret values live in the environment-spec YAML and are never returned. `insights` object optional `manifest_yaml` string required Customer environment-spec YAML text. The HTTP JSON body is capped at 1 MiB and this field is capped at 512 KiB. `name` string required Example: `support-agent` Config name, case-insensitively unique among the team's active configs. ##### Request: `/v2/harness-runtime/configs` ### Payload Content type `application/json` ```json { "insights": { "logs": true, "metrics": true, "traces": true }, "manifest_yaml": "apiVersion: agents.digitalocean.com/v1alpha1\nkind: Agent\nspec:\n runtime:\n adapter: opencode\n", "name": "support-agent" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"support-agent","manifest_yaml":"apiVersion: agents.digitalocean.com/v1alpha1\nkind: Agent\nspec:\n runtime:\n adapter: opencode\n"}' \ "https://api.digitalocean.com/v2/harness-runtime/configs" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "insights": { "logs": true, "metrics": true, "traces": true }, "manifest_yaml": "apiVersion: agents.digitalocean.com/v1alpha1\nkind: Agent\nspec:\n runtime:\n adapter: opencode\n", "name": "support-agent" }' \ "https://api.digitalocean.com/v2/harness-runtime/configs" ``` #### Responses **201** Config created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `config` object optional Immutable team-scoped Environment Config: one sanitized manifest per config. There is no update; clone to a new config to change content. **Show child properties** `agentspec_schema_version` string required Example: `agents.digitalocean.com/v1alpha1` The manifest contract the server accepted at create time: the manifest's own apiVersion for legacy envelope parses (currently agents.digitalocean.com/v1alpha1), or agents.digitalocean.com/flat.v1 for flat-format parses. `content_hash` string required Example: `75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4` Lowercase SHA-256 hex digest of the canonical sanitized manifest JSON. `created_at` string (date-time) required Example: `2026-08-01T12:00:00Z` `created_by` string required Example: `user-1` Authenticated user identity that created the config. `credentials` array of object optional Redacted credential slot metadata (name/source/provider). Secret values are never included. **Show child properties** `name` string required Example: `OPENAI_API_KEY` `provider` string optional Example: `openai` `source` string, one of: tenantSecret, oauth optional Example: `tenantSecret` `id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` `insights` object optional `manifest` object required Canonical runnable environment spec JSON, immutable after create. Validated non-secret spec.env and spec.permissions remain; spec.secrets retains name/source/provider but omits ref and the write-only value; metadata.name is cleared while safe metadata such as labels remains. `name` string required Example: `support-agent` `region` string optional Example: `ric1` DO region slug the config lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `updated_at` string (date-time) required Example: `2026-08-01T12:00:00Z` **400** Invalid name, JSON wrapper, or environment spec. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** An active config with this name already exists for the team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **413** Request body exceeds 1 MiB. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **415** Content-Type is not application/json. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "config": { "agentspec_schema_version": "agents.digitalocean.com/v1alpha1", "content_hash": "75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4", "created_at": "2026-08-01T12:00:00Z", "created_by": "user-1", "credentials": [], "id": "019fb39c-14d9-7080-933e-b9b90e25acda", "insights": { "logs": true, "metrics": true, "traces": true }, "manifest": { "apiVersion": "agents.digitalocean.com/v1alpha1", "kind": "Agent" }, "name": "support-agent", "region": "ric1", "updated_at": "2026-08-01T12:00:00Z" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **413** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **415** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Get an active Environment Config and its environment spec. `/v2/harness-runtime/configs/{config_id}` Returns one team-scoped Environment Config including the sanitized environment spec and redacted credential slot metadata. Secret values are never returned. #### Path Parameters `config_id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` The Environment Config UUID. ##### Request: `/v2/harness-runtime/configs/{config_id}` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/019fb39c-14d9-7080-933e-b9b90e25acda" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/{config_id}" ``` #### Responses **200** The team-scoped config. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `config` object optional Immutable team-scoped Environment Config: one sanitized manifest per config. There is no update; clone to a new config to change content. **Show child properties** `agentspec_schema_version` string required Example: `agents.digitalocean.com/v1alpha1` The manifest contract the server accepted at create time: the manifest's own apiVersion for legacy envelope parses (currently agents.digitalocean.com/v1alpha1), or agents.digitalocean.com/flat.v1 for flat-format parses. `content_hash` string required Example: `75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4` Lowercase SHA-256 hex digest of the canonical sanitized manifest JSON. `created_at` string (date-time) required Example: `2026-08-01T12:00:00Z` `created_by` string required Example: `user-1` Authenticated user identity that created the config. `credentials` array of object optional Redacted credential slot metadata (name/source/provider). Secret values are never included. **Show child properties** `name` string required Example: `OPENAI_API_KEY` `provider` string optional Example: `openai` `source` string, one of: tenantSecret, oauth optional Example: `tenantSecret` `id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` `insights` object optional `manifest` object required Canonical runnable environment spec JSON, immutable after create. Validated non-secret spec.env and spec.permissions remain; spec.secrets retains name/source/provider but omits ref and the write-only value; metadata.name is cleared while safe metadata such as labels remains. `name` string required Example: `support-agent` `region` string optional Example: `ric1` DO region slug the config lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `updated_at` string (date-time) required Example: `2026-08-01T12:00:00Z` **400** config_id is not a UUID. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "config": { "agentspec_schema_version": "agents.digitalocean.com/v1alpha1", "content_hash": "75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4", "created_at": "2026-08-01T12:00:00Z", "created_by": "user-1", "credentials": [], "id": "019fb39c-14d9-7080-933e-b9b90e25acda", "insights": { "logs": true, "metrics": true, "traces": true }, "manifest": { "apiVersion": "agents.digitalocean.com/v1alpha1", "kind": "Agent" }, "name": "support-agent", "region": "ric1", "updated_at": "2026-08-01T12:00:00Z" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE Soft-delete an Environment Config. `/v2/harness-runtime/configs/{config_id}` Releases the active team-scoped name; the config row is retained (soft delete), so sessions created from it keep a resolvable config_id. #### Path Parameters `config_id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` The Environment Config UUID. ##### Request: `/v2/harness-runtime/configs/{config_id}` ### bash ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/019fb39c-14d9-7080-933e-b9b90e25acda" ``` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/{config_id}" ``` #### Responses **204** Config soft-deleted; no response body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** config_id is not a UUID. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Config still has active sessions (or active credential binding sets). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Clone an Environment Config under a new name. `/v2/harness-runtime/configs/{config_id}/clone` Copies the source config's sanitized manifest to a new UUID. Source and clone are independent (no lineage). Credential bindings are never copied: if the manifest declares secret slots, supply secrets/oauth_assignments again (write-only). content_hash matches the source when the manifest is unchanged. #### Path Parameters `config_id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` The Environment Config UUID. #### Request Body: `application/json` Clone body with required new name plus write-only credentials for any declared slots. `name` string required New config name, unique among the team's active configs. `oauth_assignments` object optional Write-only map from oauth logical slot to an OAuth assignment UUID. Required when the source declares those slots; never copied from the source. `secrets` object optional Write-only map from tenantSecret logical slot to plaintext. Required when the source declares those slots; never copied from the source. ##### Request: `/v2/harness-runtime/configs/{config_id}/clone` ### Payload Content type `application/json` ```json { "name": "string" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"support-agent-v2"}' \ "https://api.digitalocean.com/v2/harness-runtime/configs/{config_id}/clone" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }' \ "https://api.digitalocean.com/v2/harness-runtime/configs/{config_id}/clone" ``` #### Responses **201** Clone created. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `config` object optional Immutable team-scoped Environment Config: one sanitized manifest per config. There is no update; clone to a new config to change content. **Show child properties** `agentspec_schema_version` string required Example: `agents.digitalocean.com/v1alpha1` The manifest contract the server accepted at create time: the manifest's own apiVersion for legacy envelope parses (currently agents.digitalocean.com/v1alpha1), or agents.digitalocean.com/flat.v1 for flat-format parses. `content_hash` string required Example: `75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4` Lowercase SHA-256 hex digest of the canonical sanitized manifest JSON. `created_at` string (date-time) required Example: `2026-08-01T12:00:00Z` `created_by` string required Example: `user-1` Authenticated user identity that created the config. `credentials` array of object optional Redacted credential slot metadata (name/source/provider). Secret values are never included. **Show child properties** `name` string required Example: `OPENAI_API_KEY` `provider` string optional Example: `openai` `source` string, one of: tenantSecret, oauth optional Example: `tenantSecret` `id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` `insights` object optional `manifest` object required Canonical runnable environment spec JSON, immutable after create. Validated non-secret spec.env and spec.permissions remain; spec.secrets retains name/source/provider but omits ref and the write-only value; metadata.name is cleared while safe metadata such as labels remains. `name` string required Example: `support-agent` `region` string optional Example: `ric1` DO region slug the config lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `updated_at` string (date-time) required Example: `2026-08-01T12:00:00Z` **400** Invalid name, missing credential slots, or source environment spec fails current durable validation. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** An active config with this name already exists for the team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **413** Request body exceeds 1 MiB. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **415** Content-Type is not application/json. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **201** ```json { "config": { "agentspec_schema_version": "agents.digitalocean.com/v1alpha1", "content_hash": "75803fef24dc731824ecd4a1853c76153c7d8503534092b94da3ca3f31a882f4", "created_at": "2026-08-01T12:00:00Z", "created_by": "user-1", "credentials": [], "id": "019fb39c-14d9-7080-933e-b9b90e25acda", "insights": { "logs": true, "metrics": true, "traces": true }, "manifest": { "apiVersion": "agents.digitalocean.com/v1alpha1", "kind": "Agent" }, "name": "support-agent", "region": "ric1", "updated_at": "2026-08-01T12:00:00Z" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **413** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **415** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET List the sessions created from one Environment Config. `/v2/harness-runtime/configs/{config_id}/sessions` Enumerates the caller's team sessions whose session was created from this durable Environment Config. Keyset-paginated on an opaque cursor, newest first, same shape and status semantics as GET /v2/harness-runtime/sessions. #### Path Parameters `config_id` string (uuid) required Example: `019fb39c-14d9-7080-933e-b9b90e25acda` The Environment Config UUID. #### Query Parameters `page_size` integer (int32) 1 – 200 optional Example: `50` Page size. Defaults to 50 when omitted or non-positive; values above 200 are clamped to 200. Default: `50` `page_token` string optional Opaque keyset cursor returned by the previous page. Empty starts from the beginning. `status` string (enum) optional Example: `SESSION_STATUS_READY` Optional filter on session status. Empty / SESSION_STATUS_UNSPECIFIED still hides destroyed and failed sessions by default; SESSION_STATUS_ALL opts out and returns every session regardless of status. ##### Request: `/v2/harness-runtime/configs/{config_id}/sessions` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/019fb39c-14d9-7080-933e-b9b90e25acda/sessions" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/configs/{config_id}/sessions" ``` #### Responses **200** A page of sessions created from the config. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Example: `example` Opaque cursor for the next page. Empty when there are no further pages. `sessions` array of object optional **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **400** Invalid pagination input or config_id. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "example", "sessions": [ { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } ] } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET ListRegions returns the regions the caller's team may create sessions and agent configs in. `/v2/harness-runtime/regions` Per-team catalog the UI (and other clients) render as the region picker, instead of hardcoding the list. A region is chosen by the API host you call, not by a field in the request body, so a returned `slug` tells you which regional host to target — `ric1` means `https://api-ric1.digitalocean.com`. The default region is always listed and is marked `is_default`; its resources are also reachable on the region-less host, `https://api.digitalocean.com`. Every other open region is listed only when the team holds its placement grant, so a create on a listed region's host is admitted and a region missing from this list is refused. Teams not yet on the regional routing rollout see only the default region, and their responses carry no `region` field. Legacy regions are never listed. Sorted by slug; no pagination. ##### Request: `/v2/harness-runtime/regions` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/regions" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/regions" ``` #### Responses **200** The regions the team may place resources in. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `regions` array of object optional Regions the team may place resources in, each on its own API host, sorted by slug. **Show child properties** `is_default` boolean optional Example: `true` True for the region the region-less host, [https://api.digitalocean.com](https://api.digitalocean.com), serves. Exactly one listed region is the default and every team sees it. Preselect it in a picker instead of hardcoding a slug. `slug` string optional Example: `ric1` DO datacenter slug. Names the regional API host to call to work in this region — "ric1" means [https://api-ric1.digitalocean.com](https://api-ric1.digitalocean.com). A request is placed in the region of the host that served it; the optional `region` field on a create is a check against that host, not a choice of region. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "regions": [ { "is_default": true, "slug": "ric1" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET ListSessions enumerates sessions for the caller's tenant. `/v2/harness-runtime/sessions` Keyset-paginated on an opaque cursor. Results are scoped to the authenticated team. Destroyed and failed sessions are omitted by default (matching the Cloud Console); pass `status=SESSION_STATUS_ALL` to list every session regardless of status, or an explicit status such as `status=SESSION_STATUS_FAILED` or `status=SESSION_STATUS_DESTROYED` to list only those. #### Query Parameters `page_size` integer (int32) 1 – 200 optional Example: `50` Page size. Defaults to 50 when omitted or non-positive; values above 200 are clamped to 200 (not rejected). Default: `50` `page_token` string optional Opaque keyset cursor returned by the previous page. Empty starts from the beginning. `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` Optional filter on session status. Empty / SESSION_STATUS_UNSPECIFIED means no explicit filter, which still hides destroyed and failed sessions by default; SESSION_STATUS_ALL opts out and returns every session regardless of status (no session is ever actually in this status; it only means something as a filter value here); any other explicit status overrides the default. Default: `SESSION_STATUS_UNSPECIFIED` `name` string optional Example: `demo-agent` Optional exact-name filter (case-insensitive). Returns the single live (non-terminal) session that currently holds this name for the caller's team, or an empty list if none does. Matches the live holder only, so historical terminal rows and reused names never make it ambiguous (per-team live-name uniqueness bounds it to at most one). This is how clients (doctl / Console) resolve a session name to its id; the {session_id} path stays UUID-only. `search` string optional Example: `demo` Optional case-insensitive substring filter on session name (contains), for callers that don't know the exact name (e.g. a UI search box). Unlike `name`, this may return zero, one, or many sessions, including terminal ones. Independent of `name`; at most 64 characters. ##### Request: `/v2/harness-runtime/sessions` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `next_page_token` string optional Example: `example` Opaque cursor for the next page. Empty when there are no further pages. `sessions` array of object optional **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **400** Invalid page_token. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "next_page_token": "example", "sessions": [ { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } ] } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST CreateSession provisions a sandbox and starts a Harness Runtime session. `/v2/harness-runtime/sessions` Returns once the session row is allocated. Sandbox boot completes asynchronously. Two mutually exclusive request forms are selected by Content-Type (same contract as harness-api `harness.swagger.json`): - YAML (`application/x-yaml`, `application/yaml`, `text/yaml`, `text/x-yaml`): the environment spec. Two environment-spec formats are accepted during the dual-format transition: the flat format (primary) and the legacy `agents.digitalocean.com/v1alpha1` envelope (deprecated). A top-level `apiVersion` key selects the legacy parser; its absence selects flat. Internally persists a durable Environment Config, then creates the session. - JSON (`application/json`): `{name, config_id}` loads the config, resolves its credentials from Secrets Manager at the version pinned when the config was created, and creates the session. The OpenAPI `requestBody` schemas the JSON form for client generation (Autorest cannot emit a multi–content-type body). The live API still accepts the YAML forms listed above. Successful responses may include `config_id` on the session. `X-Device-UUID` (if present) is persisted on the session row. Query parameters `openai_session_id` and `resume_on_topoff` apply to both forms; when both the JSON body field and `?resume_on_topoff=` are present, the query parameter wins. #### Query Parameters `openai_session_id` string optional Example: `sess_abc123` OpenAI Agents API session id (sess_…) for adapter: codex-agentapi. doctl creates the OpenAI session before calling DO and passes the resulting id here; harness-api persists it for correlation. Empty/omitted for every other agent kind. `resume_on_topoff` boolean optional Example: `false` Opt the new session in to automatic resumption when the team's prepayment balance is restored. Defaults to false. Exists as a query parameter so the environment spec (YAML body) form can carry it too. On the application/json form the body field is idiomatic, but this parameter wins when both are present. Must be exactly one of true/false/1/0; anything else is a 400. #### Header Parameters `X-Device-UUID` string optional Example: `device-uuid-example` Optional hardware device id forwarded by doctl. Persisted on the session row for lifecycle attribution. Values over 128 bytes are ignored. #### Request Body: `application/json` CreateSessionConfigRequest with `application/json`. The live API also accepts a raw environment spec under YAML Content-Types (see operation description); those forms are omitted from `content` so generated clients (pydo/autorest) can emit this operation. `config_id` string (uuid) required Example: `11111111-2222-3333-4444-555555555555` `name` string required Example: `demo-agent` Session name, independent of the config name. Must satisfy the existing environment-spec metadata.name rules and must not be UUID-shaped. `region` string optional Example: `ric1` Optional placement check, not a placement choice: the session is always created in the region whose API host served the request. If set, it must equal that region, or the request fails with 400 and a region_mismatch message. Honored only for teams on the regional routing rollout; ignored otherwise. `resume_on_topoff` boolean optional Example: `false` Opt the new session in to automatic resumption when the team's prepayment balance is restored. Defaults to false. Session-scoped, not config-scoped: the referenced config never confers this, so one shared config cannot enrol every session created from it. Omit to leave the default (or to let the ?resume_on_topoff= query parameter supply it). `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` Optional persistent workspace to attach at create; its files are mounted at `/workspace`. The workspace must be `AVAILABLE`, otherwise the request returns 409. Accepted only in this JSON form; an environment spec that contains workspace_id is rejected with 400. Returns 403 when persistent workspaces are not enabled for the team. ##### Request: `/v2/harness-runtime/sessions` ### Payload Content type `application/json` ```json { "config_id": "11111111-2222-3333-4444-555555555555", "name": "demo-agent", "region": "ric1", "resume_on_topoff": false, "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"name":"demo-agent","config_id":"019fb39c-14d9-7080-933e-b9b90e25acda"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "config_id": "11111111-2222-3333-4444-555555555555", "name": "demo-agent", "region": "ric1", "resume_on_topoff": false, "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions" ``` #### Responses **200** Session row allocated; sandbox boot continues asynchronously. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `session` object optional Session is the user-facing record of a environment session + sandbox pair. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **400** Invalid manifest/config JSON, incompatible credentials, deny-all egress (an empty allowlist) combined with URL-bound credentials, or invalid query parameter. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** Secrets Manager denied access to a pinned credential, or workspace_id was sent and persistent workspaces are not enabled for the team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Team is at the active-session quota, a live session name already exists, or the requested workspace_id is not AVAILABLE (attached to another session, still being saved, FAILED, or being deleted). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **413** JSON body exceeds 16 KiB or YAML body exceeds 1 MiB. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **415** Unsupported Content-Type. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Requested capability is not available. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** Secrets Manager is unavailable. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "session": { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "mutability": { "custom_tools": false, "egress": true, "env": true, "model": true, "permissions": true, "secrets": true, "skills": false, "system_prompt": false, "tools": true }, "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "update": { "detail": "agent restart did not become healthy; reverted to previous config", "error": "update_failed", "finished_at": "2026-11-11T12:00:20Z", "kind": "update", "manifest_hash": "9f2c1a7e", "previous_hash": "3b8d0e54", "reverted": true, "sections": [ "tools" ], "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "started_at": "2026-11-11T12:00:00Z", "state": "APPLIED", "update_id": "019b0000-0000-7000-8000-000000000001", "user_email": "user@example.com", "user_uuid": "4f3c2b1a-0000-4000-8000-000000000000" }, "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **413** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **415** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST ValidatePolicy checks a manifest's tool-permission policy against the agent's capabilities without creating a session. `/v2/harness-runtime/sessions/policy/validate` Stateless preflight: parses the same environment spec as CreateSession and runs the identical resolve + validate pipeline against the capability descriptor stamped on the selected template's image (resolved per-request via the sandbox, not a separate registry). Returns per-rule verdicts. Nothing is provisioned or persisted. Each rule is validated against the descriptor for the (agent, version) the template resolves to and gets a verdict: `exact`, `degraded`, `unsupported`, or `unverified`. `ok` is false when any strict rule is unsupported or unverified — i.e. CreateSession would reject the policy for that agent. An empty `spec.permissions` returns `ok: true` with no verdicts. Because it shares the create path's descriptor lookup, the verdicts match what CreateSession would compute. #### Request Body: `application/x-yaml` The same environment spec you would submit to CreateSession (YAML). Only agent/template selection and the permissions block are used. The live API also accepts `application/yaml`, `text/yaml`, and `text/x-yaml`; OpenAPI `content` lists a single media type so generated clients can emit this operation. `apiVersion` string, one of: agents.digitalocean.com/v1alpha1 optional Example: `agents.digitalocean.com/v1alpha1` Legacy envelope only - must be "agents.digitalocean.com/v1alpha1", and its presence is what routes the document to the deprecated legacy parser. Flat-format manifests carry no version key (the endpoint owns the contract); required, with kind and spec, when authoring the legacy format. `kind` string, one of: Agent optional Example: `Agent` Must be "Agent". `metadata` object optional **Show child properties** `description` string optional Example: `Use when ...` Free-form description (max 1024 chars), stored and echoed back for Console / catalog surfaces. `labels` object optional Example: `{}` `name` string optional Example: `example` Optional team-unique session name: 1-64 chars of letters, digits, '-', '.', '_', starting and ending alphanumeric; case-insensitive; must not be UUID-shaped. Omit to have the control plane generate one ("session--"). Unique among the team's ACTIVE (non-terminal) sessions; destroying a session frees its name for reuse. `spec` object optional **Show child properties** `defaults` object optional **Show child properties** `budget` object optional Accepted, not yet enforced (returns a warning). Advisory per-run ceilings, clamped server-side to tenant policy. **Show child properties** `maxCostUSD` number optional Example: `1` `maxSteps` integer optional Example: `1` `maxWallClockSeconds` integer (int64) optional Example: `1` `onBreach` string, one of: pause, humanInput, fail optional Example: `pause` `env` object optional Example: `{}` Non-secret guest env (debug-readable - never put secrets here; use spec.secrets). Reserved platform keys (TEAM_ID, SESSION_ID, SANDBOX_ID, CONTROL_PLANE_CALLBACK_URL, SANDBOX_TEMPLATE, SANDBOX_AGENT_WORKDIR, SIZE_SLUG, SANDBOX_IMAGE_ID, SANDBOX_OCI_REF, PLANO_PERMISSION_\*) are rejected. Credential-looking values (dop_v1_..., sk-..., ghp_...) trigger a create-time warning. `memory` object optional Accepted, not yet enforced (returns a warning). **Show child properties** `backend` string required Example: `example` `scope` string, one of: tenant, user, agent, session optional Example: `tenant` `mode` string, one of: interactive, served optional Example: `interactive` Explicit lifecycle discriminator. Defaults to "interactive" (spec.serving forbidden); "served" requires spec.serving. `model` object optional Accepted, not yet enforced (returns a warning). Model routing (Plano); catalog-validated when enforcement lands. **Show child properties** `default` string optional Example: `example` `profile` string optional Example: `example` `routing` string optional Example: `example` `permissions` object optional Customer-declared tool-execution permission policy (spec.permissions). REQUEST only: the policy engine resolves it (∩ tenant ∩ platform) into the canonical policy and validates it against the (agent, version) capability descriptor. Absent or empty means the agent keeps its built-in default gating — no policy is shipped to the sandbox. **Show child properties** `defaultAction` string, one of: allow, ask, deny optional Example: `allow` Disposition for tool calls that match no rule. Defaults to "ask" when omitted. `filesystem` object optional Filesystem boundary, enforced by the microVM (read-only root + bind-mounted writable roots) for every agent. **Show child properties** `allowWrite` array of string optional Example: `["example"]` Additional writable paths beyond the workspace. Values must not contain shell-style ${VAR}/$VAR expansions. `mode` string, one of: read-only, workspace-write optional Example: `read-only` `network` object optional Network boundary. Narrows (subtract-only) spec.sandbox.egress; link-local/internal addresses stay blocked by the broader egress policy. **Show child properties** `allow` array of string optional Example: `["example"]` `default` string, one of: allow, deny optional Example: `allow` `rules` array of object optional Ordered match→action rules. Declared order is authoritative: the LAST matching rule wins (author-order last-match). **Show child properties** `action` string, one of: allow, ask, deny required Example: `allow` `enforcement` string, one of: strict, best-effort optional Example: `strict` What happens when the agent cannot enforce the rule exactly. "strict" rejects the session; "best-effort" degrades to the closest more-restrictive form and warns (never widens). Defaults to strict for deny rules, best-effort otherwise. `match` object optional Optional keys narrowing the rule (e.g. {"command": "npm run deploy"} for bash). Values are globs and must not contain shell-style ${VAR}/$VAR expansions. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `tool` string required Example: `example` Tool taxonomy this rule matches (e.g. bash, file.read, file.write, web.fetch, git.\*, mcp). `runtime` object required Canonical adapter ids: claude-code | opencode | codex | cursor | hermes | codex-agentapi | custom. codex-agentapi is the OpenAI sandbox-provider runtime (DO runs codex exec-server; the agent loop lives at OpenAI) and pairs with the opaque spec.runtime.config block. codex-cli and cursor-cli are deprecated aliases (accepted with a create-time warning). The framework adapters (openai-agents, claude-agent-sdk, crewai, langgraph) are declared but not yet supported; CreateSession rejects them. adapter: custom requires the custom block. **Show child properties** `adapter` string (enum) required Example: `claude-code` `config` object optional Example: `{}` OPAQUE, provider-specific runtime config. Only for adapter: codex-agentapi today, where it is the OpenAI Agents API create-session body (agent/environment/input) that doctl forwards verbatim to OpenAI's POST /v1/agents/sessions; harness-api stores and echoes it but never parses or validates its contents (so DO stays forward-compatible as OpenAI's schema evolves). The OpenAI session_id is passed on the create call (the openai_session_id query parameter), not in this block. `custom` object optional BYO container; requires adapter: custom. image is required and should be digest-pinned. **Show child properties** `entrypoint` array of string optional Example: `["example"]` `image` string required Example: `example.registry/image@sha256:abc` `sandbox` object optional **Show child properties** `egress` object optional Requested egress policy (legacy envelope object). Absent means no destination ACL, same as unrestricted: true. unrestricted cannot combine with allow / allowIps / vpcUuid / subnetUuid. If allow or allowIps is present and neither list names an entry, the policy is deny-all: every outbound destination is blocked. Deny-all cannot combine with unrestricted / vpcUuid / subnetUuid, and a session that also binds URL-bound credentials is rejected with 400. If the other list names entries, only those are allowed (allow: \[] with a non-empty allowIps is IP-only). A null egress, allow or allowIps is rejected with 400; omit the key instead. The flat manifest format spells these differently: egress: none (deny-all), egress: unrestricted, a bare host list (an empty list is deny-all), or an object with allow_hosts / allow_ips / vpc_uuid / subnet_uuid. Platform host defaults are unioned only when allow names something; allowIps does not trigger that union (IP-only turns the destination ACL on without domain rules). VPC attachment is create-time immutable; ownership is verified at session create. Allowlists are a request only: the server intersects them with tenant + platform policy and can only narrow them. **Show child properties** `allow` array of object optional Host allowlist. allow: \[] with no non-empty allowIps means deny-all (flat spelling: egress: none). With a non-empty allowIps it is IP-only. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `allowIps` array of string optional Example: `["example"]` Exact IPv4/IPv6 literals (not CIDRs). Present-but-empty with no non-empty allow means deny-all; allow: \[] with a non-empty allowIps is IP-only. `subnetUuid` string optional Example: `example` Optional subnet within vpcUuid. `unrestricted` boolean optional Example: `true` When true, opts out of the platform-default host allowlist union. Mutually exclusive with allow / allowIps / vpcUuid / subnetUuid. `vpcUuid` string optional Example: `example` Customer VPC UUID. Create-time immutable. `idleTimeoutSeconds` integer (int64) optional Example: `1` Inactivity suspend timeout. 0 means tenant policy default. `maxLifetimeSeconds` integer (int64) optional Example: `1` Hard wall-clock ceiling for the whole session, independent of activity. Accepted, not yet enforced (returns a warning). `mounts` array of object optional Requested data mounts. Accepted, not yet enforced (returns a warning). accessKeyRef/secretKeyRef name declared tenantSecret slots in spec.secrets, validated at create; declare those slots with env: false so the keys stay mount-scoped and out of the guest env. **Show child properties** `accessKeyRef` string required Example: `my-secret` Names a declared tenantSecret slot in spec.secrets. `bucket` string required Example: `my-bucket` `endpoint` string optional Example: `https://nyc3.digitaloceanspaces.com` Optional storage endpoint override; https:// only. `path` string required Example: `/mnt/data` Absolute guest path the mount appears at. `readOnly` boolean optional Example: `true` `secretKeyRef` string required Example: `my-secret` Names a declared tenantSecret slot in spec.secrets. `type` string, one of: s3fuse required Example: `s3fuse` `persistentWorkspace` boolean optional Example: `true` `sizeSlug` string optional Example: `example` Requested sandbox size (catalog: GET /v2/harness-runtime/sessions/sandbox/sizes). Empty means the service default. `template` string optional Example: `example` Optional sandbox template. Empty (or the legacy placeholder "coding") means "no preference": the template derives from the adapter. `secrets` array of object optional Declared credential requirements. source tenantSecret is enforced today: value is write-only plaintext, extracted into Secrets Manager at create and never persisted or returned. source oauth requires provider and carries no value: at session create, the guest environment receives a token from your team's connection for provider, or from the connection that actor names, and session create fails if that connection isn't connected. ref is legacy and ignored. env false keeps the resolved value out of the guest environment (mount-only slots). **Show child properties** `actor` string optional Example: `github1` For source oauth only: the user_id of the provider connection the secret uses, instead of your team's connection for provider. Requires naming connections in secrets to be enabled for your team. Only a secret with actor can switch to another connection on a running session (see the session update operation). `env` boolean optional Example: `true` Whether the resolved credential is injected into the guest env. Omitted means true; false is for mount-only slots (tenantSecret only). `name` string required Example: `example` `provider` string optional Example: `openai` `ref` string optional Example: `do.actions` `source` string, one of: oauth, tenantSecret required Example: `oauth` `value` string optional Example: `sk-example` Write-only tenantSecret plaintext; never persisted or returned. `serving` object optional Present only when spec.mode is "served" (autoscaled fleet). **Show child properties** `maxReplicas` integer optional Example: `1` `minReplicas` integer optional Example: `1` `scaleToZero` object optional **Show child properties** `idleSeconds` integer (int64) optional Example: `1` `targetConcurrency` integer optional Example: `1` `skills` array of object optional Inline agent skills (SKILL.md shape): reusable markdown instructions the agent loads on demand, selected by description. Accepted, not yet enforced (returns a warning). Max 32 entries; instructions additionally capped at 256 KiB summed across the list so a valid manifest always fits the request-body limits. v0 is inline-only - remote skill sources come later as an additive field. **Show child properties** `allowedTools` array of string optional Example: `["example"]` Advisory scoping of which tools the skill expects to use (experimental in the skills standard). NOT a security boundary - spec.permissions remains the only enforcement surface. `description` string required Example: `Use when ...` Load-bearing: the agent reads it to decide WHEN to load the skill (progressive disclosure); write it as "Use when ...". Max 1024 chars. `instructions` string required Example: `Use when diagnosing errors.` The markdown body (the content below the SKILL.md frontmatter). Max 32 KiB. `license` string optional Example: `Apache-2.0` Optional standard passthrough (e.g. Apache-2.0). `metadata` object optional Example: `{}` Optional string-map passthrough (e.g. author), rendered into the frontmatter verbatim. `name` string required Example: `example` Unique across the list; 1-64 chars of lowercase letters, digits, and single hyphen separators - no consecutive hyphens, per the Agent Skills spec (safe as a directory name at materialization). `tools` object optional Accepted, not yet enforced (returns a warning). Exactly one of mcpServers or bundle. **Show child properties** `bundle` string optional Example: `default` `mcpServers` array of object optional **Show child properties** `auth` object optional Brokered credential for an INLINE server (invalid on the catalog form). secretRef names a declared tenantSecret slot in spec.secrets, validated at create; the slot is resolved server-side and sent as an HTTP header. Plaintext credentials are never accepted. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `name` string optional Example: `example` Inline server name (required with url): 1-64 chars of lowercase letters, digits, '-', '.', '_', starting/ending alphanumeric. Unique across the list. Must not start with do. (reserved for catalog refs). `preloadTools` array of string optional Example: `["example"]` Catalog form only. Individual tools (optional integer pin) advertised directly in the session MCP tools/list next to the action_search/action_invoke/action_code meta tools. Each entry must appear in tools when tools is set; toolbelt references are rejected. Every preloaded schema is in the model's context on every turn, so keep this to a handful of tools. Omitted means nothing is preloaded. `ref` string optional Example: `do.actions` DO-owned catalog reference (catalog form); do.* only, e.g. do.actions. Mutually exclusive with name/url/auth. `tools` array of string optional Example: `["example"]` Optional selection allowlist; omitted means all tools the server advertises. Each entry is an individual tool name with an optional integer version pin (e.g. web_search, execute_code@3) or a toolbelt reference - a server-defined named tool group written toolbelt:\[@] (e.g. toolbelt:read-only@1; catalog refs only). Versions are integer pins (no semver). The server owns belt expansion; a pinned tool or belt attaches exactly that version, an unpinned one resolves at session create and is frozen for the session (no floating latest). Entries non-empty, unique per server. The selection bounds the session and is never preloaded into the session MCP tools/list; see preloadTools. `url` string optional Example: `https://example.com` Inline server endpoint; https:// only. `workspace` object optional Repositories the session works against. **Show child properties** `repos` array of string optional Example: `["example"]` GitHub OWNER/REPO entries, unique. The first entry becomes the session's repo_hint; the full list is the forward shape for multi-repo sessions. ##### Request: `/v2/harness-runtime/sessions/policy/validate` ### Payload Content type `application/x-yaml` ```json { "apiVersion": "agents.digitalocean.com/v1alpha1", "kind": "Agent", "metadata": { "description": "Use when ...", "labels": {}, "name": "example" }, "spec": { "env": {}, "memory": { "backend": "example", "scope": "tenant" }, "mode": "interactive", "model": { "default": "example", "profile": "example", "routing": "example" }, "permissions": { "defaultAction": "allow", "rules": [] }, "runtime": { "adapter": "claude-code", "config": {} }, "sandbox": { "idleTimeoutSeconds": 1, "maxLifetimeSeconds": 1, "mounts": [], "persistentWorkspace": true, "sizeSlug": "example", "template": "example" }, "secrets": [], "serving": { "maxReplicas": 1, "minReplicas": 1, "targetConcurrency": 1 }, "skills": [], "tools": { "bundle": "default", "mcpServers": [] }, "workspace": { "repos": [ "example" ] } } } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/policy/validate" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/x-yaml" \ -d '{ "apiVersion": "agents.digitalocean.com/v1alpha1", "kind": "Agent", "metadata": { "description": "Use when ...", "labels": {}, "name": "example" }, "spec": { "env": {}, "memory": { "backend": "example", "scope": "tenant" }, "mode": "interactive", "model": { "default": "example", "profile": "example", "routing": "example" }, "permissions": { "defaultAction": "allow", "rules": [] }, "runtime": { "adapter": "claude-code", "config": {} }, "sandbox": { "idleTimeoutSeconds": 1, "maxLifetimeSeconds": 1, "mounts": [], "persistentWorkspace": true, "sizeSlug": "example", "template": "example" }, "secrets": [], "serving": { "maxReplicas": 1, "minReplicas": 1, "targetConcurrency": 1 }, "skills": [], "tools": { "bundle": "default", "mcpServers": [] }, "workspace": { "repos": [ "example" ] } } }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/policy/validate" ``` #### Responses **200** Per-rule verdicts for the agent the manifest resolves to. A 200 with ok: false still means the policy would be rejected at CreateSession. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `agent` string optional Example: `example` `defaultAction` string, one of: allow, ask, deny optional Example: `allow` Catch-all disposition AS SHIPPED (after unverified allow→ask downgrade). When defaultActionVerdict is degraded, this remains the shipped value; see defaultActionRendered for what the agent will actually enforce. `defaultActionReason` string optional Example: `example` Human-readable explanation when defaultActionVerdict is degraded. `defaultActionRendered` string, one of: allow, ask, deny optional Example: `allow` Disposition the agent will actually enforce as the catch-all: equals defaultAction when exact; the more-restrictive degrade target (usually ask) when degraded. `defaultActionVerdict` string, one of: exact, degraded, unsupported, unverified optional Example: `exact` exact — agent can enforce the catch-all as written; degraded — agent cannot enforce the requested defaultAction (warn-only; shipped value unchanged); omitted when no descriptor was available to classify against. `ok` boolean optional Example: `true` False when any strict rule is unsupported or unverified — i.e. CreateSession would reject this policy for this (agent, version). `verdicts` array of object optional **Show child properties** `reason` string optional Example: `example` Human-readable explanation of the verdict. `rendered` string, one of: allow, ask, deny optional Example: `allow` The disposition the agent will actually enforce: the requested action when exact/unverified, the more-restrictive target when degraded, omitted when unsupported (cannot render). `rule` object optional A rule after resolution (∩ tenant ∩ platform), carrying a stable id for audit correlation. **Show child properties** `action` string, one of: allow, ask, deny optional Example: `allow` `enforcement` string, one of: strict, best-effort optional Example: `strict` `id` string optional Example: `example` Stable rule id assigned during resolution; correlates with the PolicyDenied event's matched rule. `match` object optional `tool` string optional Example: `example` `suggestion` string optional Example: `example` Optional actionable hint (e.g. "set enforcement: best-effort, or target a capable agent"). `verdict` string, one of: exact, degraded, unsupported, unverified optional Example: `exact` exact — enforced precisely as written; degraded — renderable only in a more-restrictive form (deny→ask), warned; unsupported — cannot be enforced (strict ⇒ session reject); unverified — no descriptor available, rendered conservatively but unproven. `version` string optional Example: `example` **400** Malformed manifest or invalid spec.permissions. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "agent": "example", "defaultAction": "allow", "defaultActionReason": "example", "defaultActionRendered": "allow", "defaultActionVerdict": "exact", "ok": true, "verdicts": [ { "reason": "example", "rendered": "allow", "suggestion": "example", "verdict": "exact" } ], "version": "example" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET ListSandboxSizes returns the customer-selectable sandbox (microVM) size catalog. `/v2/harness-runtime/sessions/sandbox/sizes` Read-only catalog the UI (and other clients) render as the size picker, instead of hardcoding the list. The set is the single source of truth shared with create-time validation and the default-size fallback, so every `slug` returned here is accepted by CreateSession as spec.sandbox.sizeSlug. Sizes are returned smallest-to-largest. Static and safe to cache; independent of team/session; no pagination. ##### Request: `/v2/harness-runtime/sessions/sandbox/sizes` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/sandbox/sizes" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/sandbox/sizes" ``` #### Responses **200** The supported sandbox sizes. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sizes` array of object optional Selectable sizes, ordered smallest-to-largest. **Show child properties** `memory_mb` integer (int64) optional Example: `4096` Memory in MB (for display). `price_per_hour_usd` number (double) optional Example: `3e-05` Hourly on-demand price in USD (for display). `price_per_month_usd` number (double) optional Example: `93.744` Monthly on-demand price in USD, assuming continuous usage (for display). `slug` string optional Example: `mars-2vcpu-4gb` DO size slug; submit as spec.sandbox.sizeSlug on CreateSession. e.g. "mars-2vcpu-4gb". `vcpus` integer (int64) optional Example: `2` vCPU count (for display). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "sizes": [ { "memory_mb": 4096, "price_per_hour_usd": 0.00003, "price_per_month_usd": 93.744, "slug": "mars-2vcpu-4gb", "vcpus": 2 } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET GetSession returns the current snapshot of a session. `/v2/harness-runtime/sessions/{session_id}` GetSession returns the current snapshot of a session. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. ##### Request: `/v2/harness-runtime/sessions/{session_id}` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `session` object optional Session is the user-facing record of a environment session + sandbox pair. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "session": { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "mutability": { "custom_tools": false, "egress": true, "env": true, "model": true, "permissions": true, "secrets": true, "skills": false, "system_prompt": false, "tools": true }, "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "update": { "detail": "agent restart did not become healthy; reverted to previous config", "error": "update_failed", "finished_at": "2026-11-11T12:00:20Z", "kind": "update", "manifest_hash": "9f2c1a7e", "previous_hash": "3b8d0e54", "reverted": true, "sections": [ "tools" ], "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "started_at": "2026-11-11T12:00:00Z", "state": "APPLIED", "update_id": "019b0000-0000-7000-8000-000000000001", "user_email": "user@example.com", "user_uuid": "4f3c2b1a-0000-4000-8000-000000000000" }, "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## PATCH Update a session's settings. `/v2/harness-runtime/sessions/{session_id}` Updates the settings of an existing session. Changes apply to this session only; the agent config the session was created from is not modified. Each request makes one of two kinds of update, and the two can't be combined: - **Session preferences**: set `resume_on_topoff`. Applied immediately; returns `200`. - **Session settings**: set `manifest_yaml` to a partial manifest that holds only the sections to change. Applied in the background; returns `202`. An empty body (`{}`) returns `400`. ### Updatable session settings | Section | What it changes | Agent restart | |---|---|---| | `tools` | The session's Action Gateway tools (`do.actions` entries). Custom MCP servers too, where the session's `mutability.custom_tools` is `true`. | No (LangGraph: yes). A custom MCP server change: when it alters the agent's environment | | `env` | Environment variables (name and value). | Yes | | `env.HARNESS_INFERENCE_MODEL` | The model, for sessions that use DigitalOcean Serverless Inference. | Yes | | `env.MODEL`, `env.OPENAI_MODEL`, `env.ANTHROPIC_MODEL` | The model, for sessions that use their own OpenAI-compatible or Anthropic endpoint. | Yes | | `secrets` | Plain secrets (name and value). | Yes | | `secrets` (URL-bound) | URL-bound secrets: value, `url`, and `scheme`. | No | | `secrets` (OAuth) | The provider connection an OAuth secret uses (`actor`). | Yes | | `egress` | The hosts and IP addresses the session can reach (`allow_hosts` and `allow_ips`). | No | | `permissions` | The permission policy: the default action and the full rules list. What can change depends on the agent; see below. | No (LangGraph: yes for `do.actions` rules or `default`) | | `skills` | The full list of inline skills. Supported on `claude-code`, `codex`, and `opencode`; see below. | No | Sections you omit are not changed. Each section you include replaces that section in full; see `manifest_yaml` for the exact rules. ### Changing the model You change a session's model through `env`; a top-level `model` section returns `400`. The key to set depends on the model endpoint the session was created with: | Session created with | Model endpoint | `env` key that sets the model | |---|---|---| | `HARNESS_INFERENCE_MODEL`, and none of the keys below | DigitalOcean Serverless Inference | `HARNESS_INFERENCE_MODEL` | | `OPENAI_BASE_URL` | Your OpenAI-compatible endpoint | `MODEL`, or `OPENAI_MODEL` | | `ANTHROPIC_BASE_URL`, or an `ANTHROPIC_API_KEY` secret | Your Anthropic endpoint, or the Anthropic API | `ANTHROPIC_MODEL`, or `MODEL` | A session keeps the model endpoint it was created with. Its provider and base URL can't be changed (`422`). The provider API key (`OPENAI_API_KEY` or `ANTHROPIC_API_KEY`) can be rotated but not added, removed, or moved to another URL or scheme (`422`). See `manifest_yaml` for the rules. The following can't be changed on an existing session: the egress VPC (`vpc_uuid` and `subnet_uuid`, `422`) and platform-managed model keys. To use a different VPC, create a new session. ### Custom MCP servers A custom MCP server (`name` and `url`) in `tools` can be added, modified, or removed on a running session only where the session's `mutability.custom_tools` is `true`, and `mutability.tools` is `true` too. Read `mutability` from the session (`GET /v2/agents/sessions/{session_id}`). Where `custom_tools` is `false`, the request returns `409` and the message ends with `(update_unsupported)`. The flag is `false` for every agent until its custom-server update is supported, and a session created before an agent was enabled keeps reading `false`; create a new session to change its custom MCP servers. Include the session's other custom MCP servers exactly as they are, because `tools` replaces the whole list. The agent restarts when the change alters its environment (a server added, removed or moved, or a changed credential), and the update then ends `APPLIED_RESTARTED`. A change that doesn't, such as editing the `tools` allowlist of an existing server, ends `APPLIED`. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its credential in the same request, so a credential never goes to a destination the request did not name. Either send the secret's value in `secrets` (a plain secret), or use a URL-bound secret whose `url` covers the server's URL: the same host, a path prefix of the server's path, and the default port. A URL-bound secret needs that coverage even when you send its value. Otherwise the request returns `400`. A server whose `url` differs only in the case of the scheme or host is the same server. A new server host under an egress allowlist also needs `mutability.egress` to be `true`. ### Switching an OAuth connection An OAuth secret that names a provider connection with `actor` can move to another connection of the same provider while the session runs. `actor` is the connection's `user_id`; see [`GET /v2/harness-runtime/auth/{provider}/connections`](#harness_list_provider_connections). Send the secret with `source`, `provider`, and the new `actor`, and keep every other secret as `{}`. Leaving out `provider` or `actor` returns `400`. See `manifest_yaml` for an example. The platform first checks that you can use the new connection: it must be active and owned by you. Another team member's connection returns `400`, even when it is active. Switching back to the connection the agent config names skips this check, so any team member can do it. If the platform can't reach its connection service to check, the request returns `503`; retry it. The platform then gives the session that connection's token and restarts the agent, so the next `git` operation uses the new connection. Sending the connection the secret already uses returns `200` with `outcome` set to `UNCHANGED`. The switch applies to this session only: - New sessions from the same agent config still start on the connection the config names. - A rollback, or a fork from a checkpoint, uses the connection the session had when the checkpoint was taken. - The switch changes only the token in the session. Action Gateway tools (`do.actions` entries) keep using the connection Action Gateway picks for the session, so `git` and those tools can act as different accounts. - A token the agent already read stays valid with the provider until the old connection is revoked. Switching OAuth connections must be enabled for your team (`403` otherwise). The following still require a new session (`422`): adding or removing an OAuth secret, changing its provider, and switching an OAuth secret that was created without `actor`. ### URL-bound secrets and egress URL-bound secret and `egress` changes take effect on the session's next outbound connection. An update that changes only URL-bound secrets and `egress` doesn't restart the agent and ends in `APPLIED`. Connections that are already open stay open, including connections to a host that the update removed. These updates have the following additional requirements: - URL-bound secret and egress updates must be enabled for your team. Otherwise, the request returns `403`. - The session must have been created with a URL-bound secret or an egress allowlist. A session created with unrestricted egress and no URL-bound secrets can't gain either one: the update ends in `FAILED` with `error` set to `requires_new_session`. - Changing `egress`, or adding a URL-bound secret for a host the session can't reach yet, requires that the session's agent runtime supports egress updates. Sessions created before egress updates were available don't support them (`409`). See `manifest_yaml` for the format of each change. ### Changing permissions `permissions` replaces the whole policy: `default` and the full `rules` list. A rule you leave out is removed. Use the same fields as when you create the session. `permissions: {}` removes the policy, so the agent goes back to its built-in default, as long as every rule it removes is one the agent can change (see below). `permissions: null` returns `400`. Rules are checked in the order you list them, and the last rule that matches wins. The order is part of the policy, so moving a rule counts as a change and is applied like any other. The agent is not restarted; the new rules apply from its next tool call once the update is `APPLIED`. On `langgraph`, a change to `do.actions/` rules or `default` restarts the agent, as a `tools` change does. Only sessions created after live permissions updates were released can change `permissions`. An older session returns `409`; create a new session instead. What can change depends on the session's agent: - `claude-code`, `opencode`: `default` and `bash`, `file.read`, `file.write`, `mcp`, and `do.actions/` rules, with `allow`, `ask`, or `deny`. - `openhands`: `default` and `bash`, `file.read`, `file.write`, and `web.fetch` rules. Not `mcp` or `do.actions/` rules. While the session uses `do.actions` tools, `default` can't change: the change would move the session to a new Action Gateway endpoint, which `openhands` can't pick up while running. - `codex`: `default` and `bash` and `do.actions/` rules, with `allow`, `ask`, or `deny`. Not `file.read`, `file.write`, `web.fetch`, or `mcp` rules. - `hermes`, `langgraph`: `do.actions/` rules with `allow` or `deny`, and `default` set to `allow` or `deny`. Not `ask`, and no other rule types. - `crewai`, `cursor`, and any other agent: nothing. `permissions.filesystem` and `permissions.network` can't be changed on any agent. If your `permissions` section leaves them out, the session keeps the ones it has; if it sets them to something different, the request returns `409`. Only the differences from the current policy are checked: rules you add, remove, change, or move, and a changed `default`. Rules you keep as they are never cause a refusal. A removed rule is checked like an added one, so a rule of a type the agent can't change can't be removed either: every `permissions` section you send has to keep it, and `permissions: {}` returns `409` while the policy has one. For example, `{}` returns `409` on a `codex` session with a `file.read` rule, or on a `hermes` session with a `bash` rule. If any change can't be applied on the session's agent, the request returns `409` and nothing is applied, including changes to other sections. The error message names the unsupported changes and what the agent can change. Remove them and send the update again. For example: ``` permissions can't change live on hermes for: bash rule "rm -rf *" (only do.actions allow/deny rules and an allow or deny default action can change on this agent). Remove these changes and send the update again (update_unsupported) ``` If the agent itself refuses a change after the request is accepted, the update ends `FAILED` with `session.update.reverted` set to `true`, and `session.update.detail` says to remove the permission changes the agent can't take and send the update again. ### Changing skills `skills` replaces the session's whole list of inline skills. Send every skill the session should keep, with the same fields as when you create the session: `name`, `description`, `instructions`, and optionally `license`, `metadata`, and `allowed_tools`. A skill you leave out is removed. `skills: []` removes every skill, and `skills: null` returns `400`. The list is checked with the same rules and limits as at session creation: at most 32 skills, and at most 512 KiB for all skills together (`400` otherwise). `manifest_yaml` itself can be at most 1 MiB and the request body at most 2 MiB (`413` otherwise). The same skills in a different order are not a change. The agent is not restarted, so the conversation continues. The agent reloads its skills, and the new list is in use once the update is `APPLIED`. `session.update.changes.skills` names the skills added, removed, or changed, never their content. Changing `skills` is supported on `claude-code`, `codex`, and `opencode` sessions. On any other agent, or on a session created before live updates were available, a manifest with a `skills` section returns `409`, even if the list matches the session's skills. Changing `skills` must be enabled for your team (see Requirements below). If the agent refuses the new skills after the request is accepted, the update ends `FAILED` with `error` set to `update_failed` and `session.update.reverted` set to `true`, and the session keeps its previous skills. This happens when a skill has the same name as one the session's repository already provides: rename the skill and send the update again on the same session. Only when the session's agent can't reload skills while it runs does the update end with `error` set to `requires_new_session`. If the same update also changes `permissions`, the platform can't tell which of the two the agent refused: the update ends `FAILED` with `error` set to `update_failed`, and sending the `permissions` and `skills` changes as separate updates shows which one the agent can't take. ### Tracking an update 1. A request that changes the session settings returns `202` with `outcome` set to `ACCEPTED`. The session status becomes `SESSION_STATUS_UPDATING`. 2. Poll [`GET /v2/harness-runtime/sessions/{session_id}`](#harness_get_session) every 2 to 5 seconds until the status is `SESSION_STATUS_READY`, or `SESSION_STATUS_PAUSED` if the session was paused when you sent the update. The session returns to that status whether the update succeeded or failed. 3. Read `session.update.state`: - `APPLIED`: the update is live. - `APPLIED_RESTARTED`: the update is live and the agent was restarted to apply it. - `FAILED`: the update did not take effect. `session.update.detail` explains why, and `session.update.reverted` is `true` if the previous settings were restored. Tool, URL-bound secret, `egress`, `permissions`, and `skills` updates usually finish within a few seconds, except on `langgraph`, where a `tools` update or a `permissions` change to `default` or `do.actions/` rules restarts the agent. Updates to `env` (including the model) or plain secrets, and OAuth connection switches, restart the agent and can take up to about two minutes. If the request matches the session's current settings, it returns `200` with `outcome` set to `UNCHANGED` and nothing is applied. ### Versioning Each accepted update is recorded with its own `update_id` and the manifest hashes before and after the change (`session.update.previous_hash` and `session.update.manifest_hash`). When an update fails, the session is rolled back to its previous settings and `session.update.reverted` is `true`. Once a session's settings differ from its agent config, the session reports `config_drifted: true`, `config_diff` lists the changed entries, and `manifest` holds the settings the session now runs with (without secret values). ### Requirements - The session status must be `SESSION_STATUS_READY`, `SESSION_STATUS_DETACHED`, or `SESSION_STATUS_PAUSED`. A paused session is resumed to apply the update and paused again afterwards, unless it was paused for zero balance. Any other status returns `409`, including `SESSION_STATUS_PROVISIONING`, `SESSION_STATUS_UPDATING`, a session paused for zero balance, and a destroyed or failed session. A locked session returns `423`. - The session must be idle: no agent turn running and no approval pending (`409`). - Session settings updates must be enabled for your team. Changing `permissions` must also be enabled for your team; if it isn't, a request whose manifest includes a `permissions` section returns `403`, even if the section matches the session's policy. Likewise, changing `skills` must be enabled for your team; if it isn't, a request whose manifest includes a `skills` section returns `403`, even if the list matches the session's skills. - Not every agent runtime supports every section, or every `permissions` change (see Changing permissions above). An unsupported change returns `409`, and nothing is applied. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` Set either `resume_on_topoff` or `manifest_yaml`, not both. `manifest_yaml` string optional A partial agent manifest, as a YAML string, that holds only the sections to change. Can't be combined with `resume_on_topoff`. Requires session settings updates to be enabled for your team (`403` otherwise). Supported sections are `tools`, `env`, `secrets`, `egress`, `permissions`, and `skills`. Sections you omit are not changed. Any other top-level key returns `400`, including `model` (set the model in `env` instead; see **Changing the model**). Each section you include replaces that section in full: - `tools`: the complete list of tools for the session. Action Gateway tools (`do.actions` entries) can be added, removed, or changed. A custom MCP server can be added, modified, or removed only where the session's `mutability.custom_tools` is `true`; otherwise the request returns `409`. Include the session's current custom MCP servers exactly as they are unless you are changing them. A server with `auth` that is added, moved to another `url`, or given another secret slot needs its secret's value in the same request, or a URL-bound secret that covers its `url`; otherwise the request returns `400`. To remove all Action Gateway tools from a session that has no custom MCP servers, send `tools: []`. `tools: null` returns `400`. - `env`: the complete set of environment variables, as name-value pairs. A variable you leave out is removed. `env: {}` removes all variables; `env: null` returns `400`. - `secrets`: the complete set of secrets, as name-value pairs. A secret you leave out is removed. For each secret, set the value to a string to add or rotate it, or to `{}` to keep its current value. URL-bound and OAuth secrets also accept an object; see **URL-bound secrets** and **Switching an OAuth connection**. A `null` value returns `400`. - `egress`: the complete egress allowlist, as an object with `allow_hosts` (hostnames) and `allow_ips` (exact IPv4 or IPv6 addresses, not CIDR ranges). Only this object form is supported in an update. It replaces the session's current allowlist: a host or IP address you leave out is removed. Leave out `vpc_uuid` and `subnet_uuid` to keep the session's current VPC, or set them to their current values. A different value returns `422`. See **Egress**. - `permissions`: the complete permission policy, `default` and the full `rules` list, with the same fields as at session creation. A rule you leave out is removed. `permissions: {}` removes the policy (the agent's built-in default applies); `permissions: null` returns `400`. What can change depends on the session's agent, and `permissions.filesystem` and `permissions.network` can't be changed. Removing a rule is a change too: a rule of a type the agent can't change must be kept, so `{}` returns `409` while the policy has one. If any change can't be applied on the agent, the request returns `409` and nothing is applied; the error message names the unsupported changes so you can remove them and send the update again. Sessions created before live permissions updates were released return `409`. - `skills`: the complete list of inline skills, with the same fields and limits as at session creation. A skill you leave out is removed. `skills: []` removes every skill; `skills: null` returns `400`. The same skills in a different order are not a change. Supported on `claude-code`, `codex`, and `opencode` sessions (`409` otherwise), and must be enabled for your team (`403` otherwise). The agent reloads its skills without a restart. If the agent refuses them (for example, a skill named like one the session's repository already ships), the update ends in `FAILED` with `error` set to `update_failed` and the session keeps its previous skills: rename the skill and send the update again. Only an agent that can't reload skills on a running session ends with `requires_new_session`. **URL-bound secrets.** The egress proxy sends a URL-bound secret only to requests that match its `url`; the agent never receives the value. An update to a URL-bound secret doesn't restart the agent. In `secrets`, you can: - Rotate the value: set the secret to the new value as a string. Its `url` and `scheme` don't change. - Move it to another URL or scheme: set it to `{value, url, scheme}`. A new host or path, or a change to `scheme: raw`, requires `value` (`400` otherwise). Sending the current `value`, `url`, and `scheme` again is not a change. - Add one: set it to `{value, url}`. `scheme` is optional and defaults to `bearer` (`Authorization: Bearer `); `raw` sends the value exactly as stored. - Bind an existing plain secret to a URL: set it to `{url}`. The secret keeps its current value. - Keep one unchanged: set it to `{}`. - Remove one: leave it out of `secrets`. `url` must use `https://` and name an exact hostname (no wildcards, IP addresses, or `localhost`), with an optional path and no port, query, or fragment. A session can have up to 16 URL-bound secrets, fewer if it has storage mounts, which count toward the same limit. A URL-bound secret can't be changed back to a plain secret. If the session has an egress allowlist, the secret's host is added to it. After a rollback or fork, a URL-bound secret that was moved off its agent config's URL can need its value again: the request returns `409` until you send `value`. **Egress.** `egress` changes the hosts and IP addresses the session can reach. The new allowlist takes effect on the session's next outbound connection, without an agent restart. Connections that are already open stay open, including connections to a host you removed. Only `allow_hosts` and `allow_ips` can change; the VPC is fixed when the session is created. A session created with unrestricted egress and no URL-bound secrets can't gain an allowlist: the update ends in `FAILED` with `error` set to `requires_new_session`. **Switching an OAuth connection.** An OAuth secret that was created with `actor` can move to another connection of the same provider: set it to `{source: oauth, provider, actor}` with the new connection's `user_id` as `actor`; leaving out `provider` or `actor` returns `400`. The connection must be active and owned by you, except when you switch back to the connection the agent config names. Another team member's connection returns `400`. Switching OAuth connections must be enabled for your team (`403` otherwise). The agent restarts to read the new token. Sending the connection the secret already uses is not a change. Adding or removing an OAuth secret, changing its provider, or switching one that was created without `actor` returns `422`. This example switches `GITHUB_TOKEN` to the connection `github2` and assumes the session has no other secrets: ```yaml secrets: GITHUB_TOKEN: source: oauth provider: github actor: github2 ``` **Changing the model.** You change a session's model through `env`. The key to set depends on the model endpoint the session was created with: - DigitalOcean Serverless Inference (created with `HARNESS_INFERENCE_MODEL` and without `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL`, or an `ANTHROPIC_API_KEY` secret): set `HARNESS_INFERENCE_MODEL` to a Serverless Inference model ID, or to `router:` for an inference router. Removing the key, or moving the session to its own endpoint, returns `422`. Adding the key to a session that was created without it also returns `422`. - Your own OpenAI-compatible endpoint (created with `OPENAI_BASE_URL`): set `MODEL`. The session reads `MODEL` before `OPENAI_MODEL`, so set `OPENAI_MODEL` only if the session uses it and doesn't have `MODEL`. - Your own Anthropic endpoint (created with `ANTHROPIC_BASE_URL`), or the Anthropic API (created with an `ANTHROPIC_API_KEY` secret and no base URL): set `ANTHROPIC_MODEL`. The session reads `ANTHROPIC_MODEL` before `MODEL`. On a session that uses its own endpoint, the following rules also apply: - Removing the model key makes the agent use its default model for that endpoint. - The model provider and the base URL (`OPENAI_BASE_URL` or `ANTHROPIC_BASE_URL`) can't be changed (`422`). Include the base URL with its current value. - The provider API key (`OPENAI_API_KEY` or `ANTHROPIC_API_KEY`) can only be rotated: set it to the new value as a string, or to `{}` to keep it. Removing it, adding it to a session that was created without it, or changing its `url` or `scheme` returns `422`. If the key is URL-bound, rotating it follows the URL-bound secret rules: the agent isn't restarted, and URL-bound secret updates must be enabled for your team (`403` otherwise). A model name can't be empty, start or end with whitespace, span more than one line, be longer than 256 bytes, or contain `#` or `:` (`400`). Whether the endpoint serves the model is not checked when you send the request; an unknown model fails on the agent's next turn. **Reserved keys.** `HARNESS_INFERENCE_API_KEY` and `HARNESS_INFERENCE_BASE_URL` are managed by the platform: include them with their current values, or the request returns `422`. Framework keys can't be changed either (`422`). Mount-only secrets (`env: false`) can't be changed on an existing session: set them to `{}` (`422` otherwise). Set an OAuth secret to `{}` unless you switch its connection. Example that changes the model, keeps one secret, and rotates another. Because each section is a full replacement, the example assumes the session has no other env variables or secrets: ```yaml env: HARNESS_INFERENCE_MODEL: llama3.3-70b-instruct LOG_LEVEL: info secrets: GITHUB_TOKEN: {} JIRA_API_TOKEN: new-token-value ``` Example that changes the model and rotates the provider API key of a session that was created with its own OpenAI-compatible endpoint. The example assumes the session has no other env variables or secrets: ```yaml env: OPENAI_BASE_URL: https://llm.example.com/v1 MODEL: my-model-v2 secrets: OPENAI_API_KEY: new-api-key ``` Example that keeps one URL-bound secret, moves another to a new URL, and replaces the egress allowlist. The example assumes the session has no other secrets: ```yaml secrets: GITHUB_TOKEN: {} JIRA_API_TOKEN: value: new-token-value url: https://example.atlassian.net/rest/api/3 egress: allow_hosts: - api.github.com - example.atlassian.net allow_ips: - 203.0.113.10 ``` `resume_on_topoff` boolean optional Example: `false` Whether this session resumes automatically after it is paused for low balance and your team's prepaid balance is topped up. Applies to this session only. Can't be combined with `manifest_yaml`. ##### Request: `/v2/harness-runtime/sessions/{session_id}` ### Payload Content type `application/json` ```json { "manifest_yaml": "tools:\n - do.actions:\n tools: [toolbelt:read-only@1]\n", "resume_on_topoff": false } ``` ### bash ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"manifest_yaml":"tools:\n - do.actions:\n tools: [toolbelt:read-only@1]\n"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` ### bash ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"manifest_yaml":"permissions:\n default: ask\n rules:\n - tool: bash\n match: {command: npm test}\n action: allow\n - tool: bash\n match: {command: rm -rf *}\n action: deny\n"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` ### bash ```bash curl -X PATCH \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"manifest_yaml":"skills:\n - name: release-checklist\n description: Use when preparing a release.\n instructions: |\n 1. Bump the version.\n 2. Tag the release.\n"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` ### cURL ```bash curl -X PATCH \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "manifest_yaml": "tools:\n - do.actions:\n tools: [toolbelt:read-only@1]\n", "resume_on_topoff": false }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` #### Responses **200** The session was updated (resume_on_topoff), or the requested session settings match the current ones and nothing was applied (outcome is UNCHANGED). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `outcome` string, one of: ACCEPTED, UNCHANGED optional Example: `ACCEPTED` Returned for `manifest_yaml` requests. `ACCEPTED` (HTTP 202): the update is being applied and the session status is `SESSION_STATUS_UPDATING`. Poll the session until the status changes, then read `session.update`. `UNCHANGED` (HTTP 200): the requested settings match the current ones, so nothing was applied. `session` object optional Session is the user-facing record of a environment session + sandbox pair. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. `warnings` array of string optional Warnings about the update that did not stop it from being accepted. **202** The session settings update was accepted and is being applied. The session status is SESSION_STATUS_UPDATING. Poll the session until the status is SESSION_STATUS_READY, or SESSION_STATUS_PAUSED if the session was paused when you sent the update, then read session.update to see whether the update was applied. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `outcome` string, one of: ACCEPTED, UNCHANGED optional Example: `ACCEPTED` Returned for `manifest_yaml` requests. `ACCEPTED` (HTTP 202): the update is being applied and the session status is `SESSION_STATUS_UPDATING`. Poll the session until the status changes, then read `session.update`. `UNCHANGED` (HTTP 200): the requested settings match the current ones, so nothing was applied. `session` object optional Session is the user-facing record of a environment session + sandbox pair. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. `warnings` array of string optional Warnings about the update that did not stop it from being accepted. **400** The request is invalid. For example: the body is empty or not valid JSON, manifest_yaml is not valid YAML, a field or manifest section is not recognized, a value is invalid, or both resume_on_topoff and manifest_yaml are set. A top-level model section (set the model in env instead), permissions: null, and skills: null also return 400, as do a malformed model name and a skills list that isn't valid (for example, a duplicate or badly formed skill name, a missing description or instructions, more than 32 skills, or more than 512 KiB of skills in total). A URL-bound secret moved to a new host or path, or to scheme: raw, without value returns 400. An OAuth secret switched to a connection you can't use also returns 400: no connection has that actor, or the connection is pending, expired, revoked, or another team member's. So does an OAuth connection switch that leaves out provider or actor. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** You don't have access to this session, or session settings updates are not enabled for your team (manifest_yaml only). A URL-bound secret or egress change also returns 403 when URL-bound secret and egress updates are not enabled for your team, a manifest with a permissions section returns 403 when permission updates are not enabled for your team, a manifest with a skills section returns 403 when skills updates are not enabled for your team, and an OAuth connection switch returns 403 when switching OAuth connections is not enabled for your team. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** The session can't be updated right now. For example, it is still provisioning, already updating, running an agent turn, waiting on an approval, paused for zero balance, or destroyed, or its agent runtime doesn't support the change (including an egress change on a session that doesn't support egress updates, and a custom MCP server change on a session whose mutability.custom_tools is false). After a rollback or fork, a URL-bound secret that was moved off its agent config's URL also returns 409 until you send its value again. For a permissions change the agent can't apply, the message names the unsupported changes and ends with (update_unsupported); nothing is applied, so remove them and send the update again. A session created before live permissions updates were released can't change permissions; create a new session. A session forked from a checkpoint whose agent still reaches Action Gateway through its parent session can't take an update involving do.actions tools, including an OAuth connection switch on a session that has them; the message ends with (fork_update_unsupported), and you need a new session. A manifest with a skills section on an agent that can't take skills while it runs, or on a session created before live updates were available, also returns 409 and ends with (update_unsupported), even if the list matches the session's skills. The error message gives the reason. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **413** The request body exceeds 2 MiB, or manifest_yaml exceeds 1 MiB. A long skills list is the most likely cause; the error message gives the limit. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **422** The change can only be made by creating a new session. For example: changing a reserved platform key or a mount-only secret; adding or removing an OAuth secret, changing its provider, or switching one that was created without actor; changing vpc_uuid or subnet_uuid in egress; adding, removing, or changing HARNESS_INFERENCE_MODEL on a session that doesn't use DigitalOcean Serverless Inference; changing a session's model provider or base URL; or adding, removing, or moving the provider API key of a session that uses its own endpoint. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** The session is unavailable. Contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** A service the update depends on is unavailable. For example, an OAuth connection switch couldn't reach the connection service to check the new connection. The session wasn't changed; retry the request. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "outcome": "ACCEPTED", "session": { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "mutability": { "custom_tools": false, "egress": true, "env": true, "model": true, "permissions": true, "secrets": true, "skills": false, "system_prompt": false, "tools": true }, "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "update": { "detail": "agent restart did not become healthy; reverted to previous config", "error": "update_failed", "finished_at": "2026-11-11T12:00:20Z", "kind": "update", "manifest_hash": "9f2c1a7e", "previous_hash": "3b8d0e54", "reverted": true, "sections": [ "tools" ], "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "started_at": "2026-11-11T12:00:00Z", "state": "APPLIED", "update_id": "019b0000-0000-7000-8000-000000000001", "user_email": "user@example.com", "user_uuid": "4f3c2b1a-0000-4000-8000-000000000000" }, "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" }, "warnings": [ "string" ] } ``` **202** ```json { "outcome": "ACCEPTED", "session": { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "mutability": { "custom_tools": false, "egress": true, "env": true, "model": true, "permissions": true, "secrets": true, "skills": false, "system_prompt": false, "tools": true }, "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "update": { "detail": "agent restart did not become healthy; reverted to previous config", "error": "update_failed", "finished_at": "2026-11-11T12:00:20Z", "kind": "update", "manifest_hash": "9f2c1a7e", "previous_hash": "3b8d0e54", "reverted": true, "sections": [ "tools" ], "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "started_at": "2026-11-11T12:00:00Z", "state": "APPLIED", "update_id": "019b0000-0000-7000-8000-000000000001", "user_email": "user@example.com", "user_uuid": "4f3c2b1a-0000-4000-8000-000000000000" }, "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" }, "warnings": [ "string" ] } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **413** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **422** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE DestroySession tears down the sandbox and marks the session DESTROYED. `/v2/harness-runtime/sessions/{session_id}` Persistent workspace contents are retained per tenant policy. A persistent workspace the session holds is saved and kept: it goes to `RELEASING` while the files are saved and then back to `AVAILABLE`. Creating a session on that workspace returns `409` until it is `AVAILABLE` again. Returns 204 No Content on success. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Header Parameters `X-Device-UUID` string optional Example: `device-uuid-example` Optional hardware device id forwarded by doctl. Recorded on the session row as the device that performed the destroy. ##### Request: `/v2/harness-runtime/sessions/{session_id}` ### bash ```bash curl -X DELETE \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}" ``` #### Responses **204** Session destroyed; no response body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded, or the removal was refused because the session holds a persistent workspace and the team already has too many workspaces being saved. In the second case nothing changed and the session keeps running. Repeat the same request after the number of seconds in the Retry-After header. A session without a workspace is never refused for this reason. Response Headers `Retry-After` integer Seconds to wait before repeating the request. `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "too many of this team's workspaces are being saved; wait about 30 seconds and retry the removal" } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET ListCheckpoints enumerates a session's checkpoints, newest first. `/v2/harness-runtime/sessions/{session_id}/checkpoints` Keyset-paginated on an opaque cursor, like ListSessions. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Query Parameters `page_size` integer (int32) optional Example: `50` Page size. Defaults to 50 when omitted or non-positive. `page_token` string optional Opaque keyset cursor returned by the previous page. Empty starts from the beginning. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints` ### bash ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `checkpoints` array of object optional Newest first. **Show child properties** `checkpoint_id` string optional Example: `cp_9f2c1a4b` Public checkpoint id, stable for the checkpoint's lifetime (e.g. cp_9f2c1a4b). `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `error_message` string optional Example: `capture timed out` Client-safe failure detail; set only when status is FAILED. `event_id` string optional Example: `01JABCDEFGHJKLMNPQRSTVWXYZ` Event-log cursor (ULID) of the last event included in the cut; forks resume event replay from here. `kind` string, one of: explicit, implicit optional Example: `explicit` How the checkpoint came to exist: explicit - requested via CreateCheckpoint; implicit - minted automatically by the platform (on run completion, or when ForkSession is called without from_checkpoint_id). `label` string optional Example: `before-refactor` Optional user-supplied label from CreateCheckpoint; empty when omitted. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` Owning session. `size_bytes` integer (int64) optional Example: `1048576` Size of the captured machine state. 0 until the checkpoint reaches READY. `status` string, one of: PENDING, READY, FAILED optional Example: `READY` Capture lifecycle: PENDING -> READY | FAILED. Only READY checkpoints are forkable/restorable. CreateCheckpoint blocks until terminal, so PENDING is only ever observable via list/get while a capture is in flight. `next_page_token` string optional Opaque cursor for the next page. Empty when there are no further pages. **400** Invalid page_token. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "checkpoints": [ { "checkpoint_id": "cp_9f2c1a4b", "created_at": "2026-08-01T12:00:00Z", "error_message": "capture timed out", "event_id": "01JABCDEFGHJKLMNPQRSTVWXYZ", "kind": "explicit", "label": "before-refactor", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "size_bytes": 1048576, "status": "READY" } ], "next_page_token": "string" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST CreateCheckpoint captures the session's live sandbox state as a durable checkpoint. `/v2/harness-runtime/sessions/{session_id}/checkpoints` Synchronous: blocks until the capture reaches READY and returns the terminal Checkpoint — clients never see PENDING on this endpoint and need no poll loop. The checkpoint binds the machine-state capture to the event-log cursor at the cut, so it can later seed forks (POST .../fork) and rollback. Checkpoints are taken between turns; a session with an active turn in flight returns 409. A checkpoint captures machine state only: the files of a persistent workspace the session has are not in it, and are saved by the workspace itself. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` Optional; an empty or omitted body creates an unlabeled checkpoint. `label` string optional Optional human-readable label stored on the checkpoint; "" if omitted. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints` ### Payload Content type `application/json` ```json { "label": "string" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"label":"before-refactor"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "label": "string" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints" ``` #### Responses **200** Checkpoint captured. The returned checkpoint is terminal (status READY). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `checkpoint` object optional Checkpoint is a durable capture of a session's live sandbox machine state bound to the event-log cursor at the cut. READY checkpoints seed forks (ForkSession) and rollback. Internal fields (team_id, the substrate checkpoint id, event_seq) are never serialized. **Show child properties** `checkpoint_id` string optional Example: `cp_9f2c1a4b` Public checkpoint id, stable for the checkpoint's lifetime (e.g. cp_9f2c1a4b). `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `error_message` string optional Example: `capture timed out` Client-safe failure detail; set only when status is FAILED. `event_id` string optional Example: `01JABCDEFGHJKLMNPQRSTVWXYZ` Event-log cursor (ULID) of the last event included in the cut; forks resume event replay from here. `kind` string, one of: explicit, implicit optional Example: `explicit` How the checkpoint came to exist: explicit - requested via CreateCheckpoint; implicit - minted automatically by the platform (on run completion, or when ForkSession is called without from_checkpoint_id). `label` string optional Example: `before-refactor` Optional user-supplied label from CreateCheckpoint; empty when omitted. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` Owning session. `size_bytes` integer (int64) optional Example: `1048576` Size of the captured machine state. 0 until the checkpoint reaches READY. `status` string, one of: PENDING, READY, FAILED optional Example: `READY` Capture lifecycle: PENDING -> READY | FAILED. Only READY checkpoints are forkable/restorable. CreateCheckpoint blocks until terminal, so PENDING is only ever observable via list/get while a capture is in flight. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Session busy (an active turn is in flight), session not running, or team checkpoint storage quota exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Checkpoints are not supported for this agent/substrate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "checkpoint": { "checkpoint_id": "cp_9f2c1a4b", "created_at": "2026-08-01T12:00:00Z", "error_message": "capture timed out", "event_id": "01JABCDEFGHJKLMNPQRSTVWXYZ", "kind": "explicit", "label": "before-refactor", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "size_bytes": 1048576, "status": "READY" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET GetCheckpoint returns the current snapshot of a checkpoint. `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}` GetCheckpoint returns the current snapshot of a checkpoint. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `checkpoint_id` string required Example: `cp_9f2c1a4b` The checkpoint id. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}` ### bash ```bash curl -X GET \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}" ``` #### Responses **200** A successful response. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `checkpoint` object optional Checkpoint is a durable capture of a session's live sandbox machine state bound to the event-log cursor at the cut. READY checkpoints seed forks (ForkSession) and rollback. Internal fields (team_id, the substrate checkpoint id, event_seq) are never serialized. **Show child properties** `checkpoint_id` string optional Example: `cp_9f2c1a4b` Public checkpoint id, stable for the checkpoint's lifetime (e.g. cp_9f2c1a4b). `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `error_message` string optional Example: `capture timed out` Client-safe failure detail; set only when status is FAILED. `event_id` string optional Example: `01JABCDEFGHJKLMNPQRSTVWXYZ` Event-log cursor (ULID) of the last event included in the cut; forks resume event replay from here. `kind` string, one of: explicit, implicit optional Example: `explicit` How the checkpoint came to exist: explicit - requested via CreateCheckpoint; implicit - minted automatically by the platform (on run completion, or when ForkSession is called without from_checkpoint_id). `label` string optional Example: `before-refactor` Optional user-supplied label from CreateCheckpoint; empty when omitted. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` Owning session. `size_bytes` integer (int64) optional Example: `1048576` Size of the captured machine state. 0 until the checkpoint reaches READY. `status` string, one of: PENDING, READY, FAILED optional Example: `READY` Capture lifecycle: PENDING -> READY | FAILED. Only READY checkpoints are forkable/restorable. CreateCheckpoint blocks until terminal, so PENDING is only ever observable via list/get while a capture is in flight. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "checkpoint": { "checkpoint_id": "cp_9f2c1a4b", "created_at": "2026-08-01T12:00:00Z", "error_message": "capture timed out", "event_id": "01JABCDEFGHJKLMNPQRSTVWXYZ", "kind": "explicit", "label": "before-refactor", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "size_bytes": 1048576, "status": "READY" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## DELETE DeleteCheckpoint removes a checkpoint and its underlying machine-state capture. `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}` Idempotent: deleting an already-gone checkpoint still returns 200. Removes the DB row and the substrate checkpoint. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `checkpoint_id` string required Example: `cp_9f2c1a4b` The checkpoint id. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}` ### bash ```bash curl -X DELETE \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}" ``` ### cURL ```bash curl -X DELETE \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}" ``` #### Responses **200** Checkpoint deleted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `checkpoint_id` string optional Echo of the requested checkpoint id. `deleted` boolean optional Always true on 200 (delete is idempotent). **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "checkpoint_id": "string", "deleted": true } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Read sandbox-image notices for one checkpoint. `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/image-messages` Returns the live notices on the checkpoint's sandbox image. The checkpoint must belong to `{session_id}`. `type` filters the notice kind; the only documented value is `vulnerability`. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `checkpoint_id` string required Example: `cp_example` The checkpoint id. #### Query Parameters `type` string, one of: vulnerability optional Example: `vulnerability` Notice type. Omit it to return every type. The only documented value is `vulnerability`. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/image-messages` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/image-messages" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/image-messages" ``` #### Responses **200** Notices for this checkpoint. messages is empty when the image has none. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional A session or checkpoint and the live notices on its sandbox image. Every key is present. messages is an empty array when the image has no notice. **Show child properties** `checkpoint_id` string optional Example: `cp_example` `checkpoint_name` string optional Example: `before-upgrade` `image_id` string optional Example: `img_example` `kind` string, one of: SESSION, CHECKPOINT optional Example: `SESSION` `messages` array of object optional **Show child properties** `message` string optional Example: `This sandbox image has a published fix.` `more_info_url` string optional Example: `https://docs.digitalocean.com/products/gradient-ai-platform/` `title` string optional Example: `Image update available` `type` string optional Example: `vulnerability` Notice kind. The documented value is vulnerability. `resolution_complete` boolean optional Example: `true` `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `session_name` string optional Example: `support-agent` `vulnerable` boolean optional Example: `false` **400** Unknown type. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Image messages are not available on this deployment. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "checkpoint_id": "cp_example", "checkpoint_name": "before-upgrade", "image_id": "img_example", "kind": "SESSION", "messages": [], "resolution_complete": true, "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "session_name": "support-agent", "vulnerable": false } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST RollbackToCheckpoint rewinds a session to a checkpoint. `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/rollback` In-place restore: boots a fresh sandbox from the checkpoint and atomically swaps the session's sandbox pointer to it, so the session keeps its same session_id; the old sandbox is then torn down. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `checkpoint_id` string required Example: `cp_9f2c1a4b` The checkpoint id. ##### Request: `/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/rollback` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/rollback" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/checkpoints/{checkpoint_id}/rollback" ``` #### Responses **200** The session after in-place rollback: same session_id, sandbox_id swapped to the restored VM. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `session` object optional Session is the user-facing record of a environment session + sandbox pair. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Checkpoint is not READY, the session has a persistent workspace, or the session cannot be rolled back in its current state. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Rollback is not supported for this agent/substrate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "session": { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "mutability": { "custom_tools": false, "egress": true, "env": true, "model": true, "permissions": true, "secrets": true, "skills": false, "system_prompt": false, "tools": true }, "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "update": { "detail": "agent restart did not become healthy; reverted to previous config", "error": "update_failed", "finished_at": "2026-11-11T12:00:20Z", "kind": "update", "manifest_hash": "9f2c1a7e", "previous_hash": "3b8d0e54", "reverted": true, "sections": [ "tools" ], "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "started_at": "2026-11-11T12:00:00Z", "state": "APPLIED", "update_id": "019b0000-0000-7000-8000-000000000001", "user_email": "user@example.com", "user_uuid": "4f3c2b1a-0000-4000-8000-000000000000" }, "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST ForkSession creates child sessions from a checkpoint of this session. `/v2/harness-runtime/sessions/{session_id}/fork` Each child boots a fresh sandbox from the checkpoint's machine-state capture and is drivable exactly like any other session (input, HITL), with parent_session_id and fork_id set for lineage. When from_checkpoint_id is omitted, an implicit checkpoint of the session "now" is captured first and the children fork from that. All-or-nothing: on failure nothing is left running. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` Optional; an empty or omitted body forks a single child from an implicit checkpoint of "now". `count` integer (int32) optional Number of child sessions to create, 1-4. Defaults to 1 when omitted; a value outside 1-4 is rejected with 400. `from_checkpoint_id` string optional Checkpoint to fork from; must be READY. Omitted/empty means capture an implicit checkpoint of the session "now" first and fork from that. ##### Request: `/v2/harness-runtime/sessions/{session_id}/fork` ### Payload Content type `application/json` ```json { "count": 1, "from_checkpoint_id": "string" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"count":1}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/fork" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "count": 1, "from_checkpoint_id": "string" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/fork" ``` #### Responses **200** The created child sessions (each a full Session, PROVISIONING -> READY). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `sessions` array of object optional The created child sessions, each a full Session with parent_session_id and fork_id set (PROVISIONING -> READY) and drivable exactly like any other session. **Show child properties** `agent_kind` string (enum) optional Example: `AGENT_KIND_UNSPECIFIED` AgentKind identifies what runs inside the session sandbox. CreateSession accepts CLAUDE_CODE, OPENCODE, CODEX_CLI, CURSOR_CLI, OPENAI_CODEX, LANGGRAPH, and CREWAI (the supported set is overridable via HARNESS_SUPPORTED_AGENT_KINDS); other values are rejected with 400. AGENT_KIND_OPENAI_CODEX is the OpenAI sandbox-provider kind (DO runs codex exec-server; the agent loop lives at OpenAI). AGENT_KIND_LANGGRAPH is the LangGraph framework adapter. AGENT_KIND_CREWAI is the CrewAI Crew framework adapter: like LANGGRAPH the template bakes no agent code, so spec.env must supply FRAMEWORK_REPO and FRAMEWORK_REPO_SHA; a Crew kickoff is one-shot and exposes no HITL surface. CREWAI is additionally gated per team and returns 400 for teams it is not enabled for. `config_diff` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. **Show child properties** `added` array of string optional Example: `["example.atlassian.net"]` `mode` string, one of: allowlist, unrestricted, deny_all optional Example: `allowlist` The new egress mode. Present only when the mode changed. `removed` array of string optional Example: `["203.0.113.10"]` `env` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. **Show child properties** `default` string optional Example: `ask` The new default action (`allow`, `ask`, or `deny`), when it changed. Empty when the default was removed. `rules` object optional Names of the rules added, removed, or changed. `changed` covers a rule kept under the same tool and match with another action, or at another position. The last matching rule wins, so the order is part of the policy. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. **Show child properties** `added` array of string optional Example: `["jira"]` `changed` array of string optional Example: `["github"]` `removed` array of string optional Example: `["docs"]` `config_drifted` boolean optional Example: `true` True when the running config differs from the manifest the session was created from, for example after a successful PATCH with `manifest_yaml`. Omitted when false. `config_diff` doesn't cover every kind of drift: after an update that only switched an OAuth connection, `config_drifted` is true and `config_diff` is omitted. `manifest` shows the new `actor`. `config_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Durable Environment Config UUID the session was created from (inline manifests persist a config too, named after the session). Persisted and returned on create/get/list; absent only for sessions created before config references were stored. `created_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` `fork_from_checkpoint_id` string optional Example: `example` Lineage: harness-api checkpoint id (cp_) the child booted from at fork time. Drives OHP inherited-history replay on attach. Omitted/empty for root sessions and legacy forks created before this field was persisted. `fork_id` string (uuid) optional Example: `11111111-2222-3333-4444-555555555555` Lineage: branch label assigned when this session was created by ForkSession (or rollback's internal fork). Omitted/empty for root sessions. `idle_timeout_seconds` integer (int64) optional Example: `60` This session's own idle-pause timeout (manifest idle_timeout). Omitted when the session uses the deployment-wide default. `keep_warm` boolean optional Example: `false` Session is exempt from idle auto-pause (manifest keep_warm, or the agent-kind default: hermes sessions keep warm). It still accepts a manual pause. Omitted when false. `last_event_at` string (date-time) optional Example: `2026-08-01T12:00:00Z` Timestamp of the most recent event in this session's canonical stream. Drives the inactivity policy that pauses idle sessions. `manifest` object optional The effective manifest of the session. Present only when `config_drifted` is true. Never contains secret values. `mutability` object optional Which manifest sections a live config update (`PATCH /v2/agents/sessions/{session_id}` with `manifest_yaml`) can change on this session. It describes what this session's agent can take, recorded when the session was created. A flag that is `false` answers `409` with `(update_unsupported)` when a PATCH tries to change what it covers. A session created before the field existed reads `false` for every key. A top-level `model` section in `manifest_yaml` returns `400` whatever this says. **Show child properties** `custom_tools` boolean required Example: `false` A live update can add, modify, or remove a custom MCP server (`name` and `url`) in the `tools` section. It also needs `tools`. The agent restarts when the change alters its environment. A session reads `false` until its agent's custom-server update is supported, and keeps reading `false` after that if it was created earlier. A server with `auth` that is added, moved to another `url`, or given another secret slot must carry its secret's value in the same request, or use a URL-bound secret whose `url` covers the server's `url` (`400` otherwise). A new server host under an egress allowlist also needs `egress`. `egress` boolean required Example: `true` A live update can change the `egress` section: the destinations the session can reach. `env` boolean required Example: `true` A live update can change `env` keys other than the model keys. A patch that changes both needs both. `model` boolean required Example: `true` The session's model can be changed, through `env.HARNESS_INFERENCE_MODEL` or, on a session with its own endpoint, the env key that endpoint reads its model from. Independent of `env`. `permissions` boolean required Example: `true` A live update can change `permissions`: the default and the rules of the types the session's agent enforces live. `filesystem` and `network` never change on a running session. `secrets` boolean required Example: `true` A live update can change the `secrets` section. `skills` boolean required Example: `false` A live update can change the `skills` section, the inline skill list, which is replaced as a whole. Only claude-code, codex and opencode can reload skills live. A session reads `false` until its agent's live skill update is supported, and keeps reading `false` after that if it was created earlier. While skills updates are enabled team by team, a team that has them can also change the skills of a claude-code, codex, or opencode session that reads `false`, unless the session was created before this field existed. `system_prompt` boolean required Example: `false` The session's standing instruction can be replaced by a live update. `tools` boolean required Example: `true` A live update can change the `tools` section: the Action Gateway (`do.actions`) entries. A custom MCP server also needs `custom_tools`. `name` string optional Example: `demo-agent` User-assignable display name, unique per team among non-terminal sessions. Usable in place of session_id by clients (doctl / Console resolve it to the id via the ListSessions ?name= filter; the {session_id} path stays UUID-only). Supplied via the environment-spec metadata.name, or auto-generated ("session--") when omitted. `openai_environment_id` string optional Example: `example` OpenAI Agents API environment id (env_…), captured from the resolved CODEX_ENVIRONMENT_ID guest env value. Populated only for AGENT_KIND_OPENAI_CODEX sessions. Non-secret correlation metadata. `openai_session_id` string optional Example: `example` OpenAI Agents API session id (sess_…) this DO sandbox hosts. Populated only for AGENT_KIND_OPENAI_CODEX sessions (empty otherwise). Non-secret correlation metadata; a client (doctl agents attach) reads it to bridge to the OpenAI session. See docs/design/openai-sandbox-provider.md. `parent_session_id` string optional Example: `example` Lineage: id of the session this one was forked from. Omitted/empty for root (non-fork) sessions. `pause_reason` string optional Example: `manual` Why this session is paused. Present only when status is SESSION_STATUS_PAUSED; omitted otherwise. Known values: manual (the customer paused the session), idle (inactivity auto-pause), zero_balance (prepay gate; stored rows may still say low_balance), trigger (a reuse trigger paused the session after a firing). Clients should treat an unrecognized value as an opaque reason string. `region` string optional Example: `ric1` DO region slug the session lives in, e.g. ric1. Stamped once at create from the region whose API host served the request, and never changed. Returned only for teams on the regional routing rollout; omitted otherwise. `repo_hint` string optional Example: `example` Optional repository hint supplied at session creation (first spec.workspace.repos entry of the manifest). Not authoritative; the agent may change repos in-session. `resume_on_topoff` boolean optional Example: `false` Session consents to being resumed automatically when the team's prepayment balance is restored after a low-balance pause. Defaults to false at create time; may be toggled later via PATCH /v2/harness-runtime/sessions/{session_id} (resume_on_topoff only). Only a session paused with reason low_balance whose latest run did not complete is ever resumed automatically - a session the customer paused themselves, or one that idled out, stays paused regardless. Not an environment-spec field, and forks do not inherit it. Omitted when false. `sandbox_id` string optional Example: `example` Sandbox identity for support / debugging. Informational; omitted until a sandbox is allocated. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `status` string (enum) optional Example: `SESSION_STATUS_UNSPECIFIED` SessionStatus is the lifecycle state of the sandbox + agent pair. SESSION_STATUS_ALL is a ListSessions status-filter value only -- no session is ever actually in this status. SESSION_STATUS_LOCKED is reserved for internal use and never appears in an end-user-facing response. SESSION_STATUS_UPDATING is reported while a session settings update (PATCH with `manifest_yaml`) is being applied; poll the session until it leaves this status. `update` object optional The most recent session settings update to the session, or the automatic rollback of a failed one. **Show child properties** `changes` object optional Changes made in each manifest section. Secret values are never included. **Show child properties** `egress` object optional The hosts and IP addresses an `egress` change added or removed, and the new egress mode when it changed. Omitted when the egress policy is unchanged. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `env` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `permissions` object optional Changes to the permission policy. A rule is named by its tool and match values, for example `bash "git *"` or `do.actions/web_search`. Omitted when the permissions are identical. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `secrets` object optional Secret names, never values. On an update, `changed` lists the secrets that got a new value, were bound to another URL or scheme, or were switched to another OAuth connection. On `config_diff`, `changed` lists only the secrets bound to a different URL or scheme than in the agent config; a switched OAuth connection isn't listed there. `skills` object optional Skill names, never their content. `changed` lists the skills kept under the same name whose definition changed. `tools` object optional Names of the entries added, removed, or changed in one manifest section. *Additional nested properties not shown. Refer to the [full API spec](https://github.com/digitalocean/openapi) for details.* `detail` string optional Example: `agent restart did not become healthy; reverted to previous config` Human-readable explanation, typically for a failed update. `error` string, one of: update_failed, requires_new_session, interrupted optional Example: `update_failed` Failure class; present when state is FAILED. `finished_at` string (date-time) optional Example: `2026-11-11T12:00:20Z` `kind` string, one of: update, rollback optional Example: `update` `manifest_hash` string optional Example: `9f2c1a7e` Hash of the manifest after this update. `previous_hash` string optional Example: `3b8d0e54` Hash of the manifest before this update. `reverted` boolean optional True when a failed update was rolled back to the previous config. `sections` array of string optional Example: `["tools"]` Manifest sections this update touched. `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `started_at` string (date-time) optional Example: `2026-11-11T12:00:00Z` `state` string, one of: APPLYING, APPLIED, APPLIED_RESTARTED, FAILED optional Example: `APPLIED` State of a session settings update. `APPLYING`: in progress. `APPLIED`: live. `APPLIED_RESTARTED`: live, and the agent was restarted to apply it (`env` and plain secret changes). `FAILED`: the update did not take effect; see `reverted` and `detail`. `update_id` string optional Example: `019b0000-0000-7000-8000-000000000001` `user_email` string optional Example: `user@example.com` Email of the user who requested the update. `user_uuid` string optional Example: `4f3c2b1a-0000-4000-8000-000000000000` User who requested the update. `warnings` array of string optional Example: `[]` Non-fatal advisories computed from the manifest at create time: one entry per populated accepted-but-not-yet-enforced section (flat names: secrets, model, tools, memory, budget, max_lifetime, mounts; legacy manifests get the corresponding spec.* paths), a deprecation entry when a legacy-envelope manifest or an adapter alias (codex-cli, cursor-cli) is used, and a heuristic entry per credential-looking spec.env value. Populated on the CreateSession response only. `workspace_id` string optional Example: `019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70` The persistent workspace attached to the session, mounted at `/workspace`. Empty when the session has none. Fork and rollback return 409 for a session that has a workspace. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Team is at the active-session quota, the checkpoint is not READY, the source session is itself a fork, or the source session has a persistent workspace. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Forking is not supported for this agent/substrate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "sessions": [ { "agent_kind": "AGENT_KIND_UNSPECIFIED", "config_drifted": true, "config_id": "11111111-2222-3333-4444-555555555555", "created_at": "2026-08-01T12:00:00Z", "fork_from_checkpoint_id": "example", "fork_id": "11111111-2222-3333-4444-555555555555", "idle_timeout_seconds": 60, "keep_warm": false, "last_event_at": "2026-08-01T12:00:00Z", "name": "demo-agent", "openai_environment_id": "example", "openai_session_id": "example", "parent_session_id": "example", "pause_reason": "manual", "region": "ric1", "repo_hint": "example", "resume_on_topoff": false, "sandbox_id": "example", "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "SESSION_STATUS_UNSPECIFIED", "warnings": [], "workspace_id": "019a2f4e-8c1d-7b3a-9e5f-2d6c8a1b4e70" } ] } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST ResolveHITL records the user's decision on a pending HITL request. `/v2/harness-runtime/sessions/{session_id}/hitl/{request_id}` harness-api forwards the decision into the owning microVM via the inbound runtime.v1.OHR.ResolveHITL RPC (dialed through the guest-fronting proxy), which unblocks the gated agent action. The resolution is also echoed to all attached clients as a HITLResolved event on StreamSession. Returns 204 No Content on success. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `request_id` string required Example: `hitl_example` The HITL request identifier. #### Header Parameters `X-Device-UUID` string optional Example: `device-uuid-example` Optional hardware device id forwarded by doctl. Recorded on the resulting HITL decision. #### Request Body: `application/json` `outcome` string, one of: HITL_OUTCOME_UNSPECIFIED, HITL_OUTCOME_APPROVE, HITL_OUTCOME_REJECT, HITL_OUTCOME_DEFER required Example: `HITL_OUTCOME_UNSPECIFIED` HITLOutcome is the user's decision on a HITL request. DEFER backs off this attempt without treating it as a rejection. `reason` string optional Example: `example` Optional free-text reason. Captured in the audit trail; not interpreted. `source` string, one of: RESOLUTION_SOURCE_UNSPECIFIED, RESOLUTION_SOURCE_INLINE_KEYSTROKE, RESOLUTION_SOURCE_OUT_OF_BAND optional Example: `RESOLUTION_SOURCE_UNSPECIFIED` How a HITL resolution was triggered. Defaults to RESOLUTION_SOURCE_OUT_OF_BAND when omitted. ##### Request: `/v2/harness-runtime/sessions/{session_id}/hitl/{request_id}` ### Payload Content type `application/json` ```json { "outcome": "HITL_OUTCOME_UNSPECIFIED", "reason": "example", "source": "RESOLUTION_SOURCE_UNSPECIFIED" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/hitl/{request_id}" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "outcome": "HITL_OUTCOME_UNSPECIFIED", "reason": "example", "source": "RESOLUTION_SOURCE_UNSPECIFIED" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/hitl/{request_id}" ``` #### Responses **204** Decision recorded; no response body. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **400** Malformed JSON or missing outcome. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Cancel the agent turn in flight. `/v2/harness-runtime/sessions/{session_id}/cancel` Stops the turn `POST /input` started. Pass `run_id` from that response to name the turn; an empty body cancels whichever turn is in flight. `outcome` is `acked` when the agent accepted the interrupt, `no_turn` when nothing addressable was running, and `unsupported` when this agent cannot be interrupted. A session that cannot take a cancel at all — paused, still starting, being destroyed, or with no active run — answers 409 instead of an `outcome`, so treat that as "nothing to cancel" rather than a fault. A team that is not enabled for turn cancel receives 403. A cancel starts nothing and is not blocked by the prepayment gate. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` `run_id` string optional Example: `run_example` Turn id returned by POST /input. Omit it to cancel whichever turn is in flight. ##### Request: `/v2/harness-runtime/sessions/{session_id}/cancel` ### Payload Content type `application/json` ```json { "run_id": "run_example" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"run_id":"run_example"}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/cancel" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "run_id": "run_example" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/cancel" ``` #### Responses **200** The cancel was delivered. See outcome for what the agent did with it. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `outcome` string, one of: acked, no_turn, unsupported required Example: `acked` acked means the agent accepted the interrupt. no_turn means nothing addressable was running. unsupported means this agent cannot be interrupted. `run_id` string optional Example: `run_example` The turn the cancel was aimed at. Omitted when an unnamed cancel found no turn. **400** The body is not valid JSON, or the agent rejected the cancel as malformed. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session, or this team is not enabled for turn cancel. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Nothing could be cancelled in the session's current state: it is paused, still provisioning, being destroyed, has no sandbox, or the agent has no active run for it. This is the ordinary answer for "nothing to cancel", not a fault. A turn that was running and has already finished returns 200 with outcome no_turn instead. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **503** The agent is not accepting requests yet. Retry once the session is ready. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "outcome": "acked", "run_id": "run_example" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **503** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Read sandbox-image notices for one session. `/v2/harness-runtime/sessions/{session_id}/image-messages` Returns the live notices on the session's sandbox image. `type` filters the notice kind; the only documented value is `vulnerability`. A session owned by another team returns 404, the same as an unknown session. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Query Parameters `type` string, one of: vulnerability optional Example: `vulnerability` Notice type. Omit it to return every type. The only documented value is `vulnerability`. ##### Request: `/v2/harness-runtime/sessions/{session_id}/image-messages` ### bash ```bash curl -X GET \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/image-messages" ``` ### cURL ```bash curl -X GET \ -H "Authorization: Bearer $API_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/image-messages" ``` #### Responses **200** Notices for this session. messages is empty when the image has none. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `resource` object optional A session or checkpoint and the live notices on its sandbox image. Every key is present. messages is an empty array when the image has no notice. **Show child properties** `checkpoint_id` string optional Example: `cp_example` `checkpoint_name` string optional Example: `before-upgrade` `image_id` string optional Example: `img_example` `kind` string, one of: SESSION, CHECKPOINT optional Example: `SESSION` `messages` array of object optional **Show child properties** `message` string optional Example: `This sandbox image has a published fix.` `more_info_url` string optional Example: `https://docs.digitalocean.com/products/gradient-ai-platform/` `title` string optional Example: `Image update available` `type` string optional Example: `vulnerability` Notice kind. The documented value is vulnerability. `resolution_complete` boolean optional Example: `true` `session_id` string optional Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` `session_name` string optional Example: `support-agent` `vulnerable` boolean optional Example: `false` **400** Unknown type. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Image messages are not available on this deployment. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "resource": { "checkpoint_id": "cp_example", "checkpoint_name": "before-upgrade", "image_id": "img_example", "kind": "SESSION", "messages": [], "resolution_complete": true, "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "session_name": "support-agent", "vulnerable": false } } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST SendInput delivers a user chat message into the session. `/v2/harness-runtime/sessions/{session_id}/input` The agent observes it on its next turn and emits subsequent events via StreamSession. The input is forwarded to the owning microVM's OHR inbound surface, which attributes it to a run and returns the run id. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` `text` string required Example: `example` The user message to deliver into the session. Required and non-empty. ##### Request: `/v2/harness-runtime/sessions/{session_id}/input` ### Payload Content type `application/json` ```json { "text": "example" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/input" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "text": "example" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/input" ``` #### Responses **200** Input accepted and attributed to a run. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `run_id` string optional Example: `example` The run id the input was attributed to. Clients can correlate against the run.started event on the stream. May be empty if OHR returned no run id. **400** Malformed JSON or empty text. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Session is not in a state that accepts input (not READY/DETACHED, or has no sandbox). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "run_id": "example" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST PauseSession freezes the session's microVM sandbox. `/v2/harness-runtime/sessions/{session_id}/pause` Supported on microvm-substrate sessions only; dewdrop/docker sessions return 501 Not Implemented. Paused sessions count against quota. Clients learn state via GetSession/ListSessions; no live session.updated event is emitted. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Header Parameters `X-Device-UUID` string optional Example: `device-uuid-example` Optional hardware device id forwarded by doctl. Recorded for audit. ##### Request: `/v2/harness-runtime/sessions/{session_id}/pause` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/pause" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/pause" ``` #### Responses **204** Session paused. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Session is not in a pauseable state (must be READY or DETACHED). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Pause is not supported for this session's substrate (docker/dewdrop). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST ResumeSession explicitly thaws a PAUSED session's microVM sandbox. `/v2/harness-runtime/sessions/{session_id}/resume` Only valid for microvm-substrate sessions; dewdrop/docker sessions return 501 Not Implemented. Implicit resume also occurs when SendInput or ResolveHITL is called on a paused session. Returns synchronously once the sandbox is ready. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Header Parameters `X-Device-UUID` string optional Example: `device-uuid-example` Optional hardware device id forwarded by doctl. Recorded for audit. ##### Request: `/v2/harness-runtime/sessions/{session_id}/resume` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/resume" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/resume" ``` #### Responses **204** Session resumed. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Session is not PAUSED. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **501** Resume is not supported for this session's substrate (docker/dewdrop). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **501** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST ExecInSandbox runs a one-shot command inside the session's sandbox. `/v2/harness-runtime/sessions/{session_id}/sandbox/exec` Runs `argv` directly in the guest (no shell). The default response is buffered JSON. Stdout and stderr are capped at 1 MiB each; truncation is indicated via response headers when present. A non-zero exit code is still HTTP 200. With Accept `text/event-stream` or `stream=1`, the response is an event stream of stdout, stderr, and exit. Set `keep_stdin_open` to leave the process stdin open. The stream then starts with `event: started` and an `exec_id`. Later bytes are POST `/v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin`. `keep_stdin_open` without the event stream returns 400. If the session cannot accept interactive stdin, the call returns 409 before any event-stream header. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. #### Request Body: `application/json` Command to run inside the sandbox. `argv` array of string required Example: `["uname","-a"]` Program and arguments. Required and non-empty; run directly, with no shell interpretation. `env` object optional Example: `{"API_BASE_URL":"https://api.example.com","API_KEY":"your-api-key","LOG_LEVEL":"debug"}` Optional environment variables for this command only; nothing is stored on the session and values are not logged, but any process in the sandbox can read them. For credentials the platform holds, use `spec.secrets`. Keys must match `[A-Z][A-Z0-9_]*` and must not be platform-reserved keys (the same rule as `spec.env`). At most 64 entries, keys up to 256 bytes, values up to 64 KiB. `keep_stdin_open` boolean optional Example: `false` Leave the process stdin open. Requires an event-stream response (Accept text/event-stream, or stream=1). The stream starts with event started and an exec_id. A buffered request with this set returns 400. `stdin` string (byte) optional Optional base64 stdin payload. Without keep_stdin_open it is delivered in full and then closed so the process sees EOF. With keep_stdin_open it is the optional first chunk. Later bytes use POST /v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin. `timeout_seconds` integer (int64) optional Example: `60` Optional timeout. Clamped server-side (default 60, maximum 240) regardless of the value sent. `workdir` string optional Example: `/workspace` Working directory inside the sandbox. Empty uses the sandbox default (/workspace); not restricted to the workspace root. ##### Request: `/v2/harness-runtime/sessions/{session_id}/sandbox/exec` ### Payload Content type `application/json` ```json { "argv": [ "uname", "-a" ], "env": { "API_BASE_URL": "https://api.example.com", "API_KEY": "your-api-key", "LOG_LEVEL": "debug" }, "keep_stdin_open": false, "stdin": "", "timeout_seconds": 60, "workdir": "/workspace" } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"argv":["uname","-a"]}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/sandbox/exec" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "argv": [ "uname", "-a" ], "env": { "API_BASE_URL": "https://api.example.com", "API_KEY": "your-api-key", "LOG_LEVEL": "debug" }, "keep_stdin_open": false, "stdin": "", "timeout_seconds": 60, "workdir": "/workspace" }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/sandbox/exec" ``` #### Responses **200** Command finished (check exit_code in the body). Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `duration_ms` integer (int64) optional Example: `12` Wall-clock duration the guest reported for the command. `exit_code` integer (int32) optional Example: `0` The guest process's exit code. Non-zero is still a 200 response. `stderr` string optional Buffered stderr, capped at 1 MiB. Check X-Exec-Stderr-Truncated for drops. `stdout` string optional Example: `Linux` Buffered stdout, capped at 1 MiB. Check X-Exec-Stdout-Truncated for drops. **400** Invalid argv, env, or request body, or keep_stdin_open without an event stream. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** The resource was not found. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Session is not in a state that can run exec, or interactive stdin is not available for this session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "duration_ms": 12, "exit_code": 0, "stderr": "", "stdout": "Linux" } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you requested could not be found." } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## POST Write one chunk of stdin to a command started with keep_stdin_open. `/v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin` `offset` is required and is the count of stdin bytes already accepted. An equal offset appends. A lower offset retries and trims the overlap. A higher offset returns 409. `data` is base64. `eof` closes stdin. A write needs `data`, `eof`, or both. Each write is at most 1 MiB. The exec id comes from the `started` event on the exec stream. An unknown or finished exec returns 404. A closed stdin, an offset gap, or a session that cannot accept interactive stdin returns 409. #### Path Parameters `session_id` string required Example: `a1b2c3d4-e5f6-7890-abcd-ef1234567890` The session UUID. `exec_id` string required Example: `01932a6e-7b4c-7d2e-8f10-1a2b3c4d5e6f` The exec id from the started event. #### Request Body: `application/json` Stdin bytes to append, or eof. `data` string (byte) optional Example: `aGVsbG8K` Base64 stdin bytes to append. Omit on an eof-only write. `eof` boolean optional Example: `false` Close stdin after this write. A later write, or a second eof, returns 409. `offset` integer (int64) required Example: `0` Required. Count of stdin bytes already accepted. An equal offset appends. A lower offset retries and trims the overlap. A higher offset returns 409. ##### Request: `/v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin` ### Payload Content type `application/json` ```json { "data": "aGVsbG8K", "eof": false, "offset": 0 } ``` ### bash ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ -d '{"data":"aGVsbG8K","offset":0}' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin" ``` ### cURL ```bash curl -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "data": "aGVsbG8K", "eof": false, "offset": 0 }' \ "https://api.digitalocean.com/v2/harness-runtime/sessions/{session_id}/sandbox/exec/{exec_id}/stdin" ``` #### Responses **200** The write was accepted. offset is the new count of stdin bytes accepted. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `offset` integer (int64) optional Example: `6` Count of stdin bytes accepted after this write. **400** Malformed JSON, missing offset, bad base64, neither data nor eof, or more than 1 MiB. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **401** Authentication failed due to invalid credentials. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **402** The team is blocked by the prepayment gate. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **403** The caller holds no access grant on the session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **404** Session not found, or the exec is unknown or already finished. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **409** Stdin is already closed, the offset skips ahead, the session cannot be operated on, or interactive stdin is not available for this session. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **423** This session is unavailable; contact support. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **429** The API rate limit has been exceeded. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **500** There was a server error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. **default** There was an unexpected error. Response Headers `ratelimit-limit` integer The default limit on number of requests that can be made per hour and per minute. Current rate limits are 5000 requests per hour and 250 requests per minute. `ratelimit-remaining` integer The number of requests in your hourly quota that remain before you hit your request limit. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. `ratelimit-reset` integer The time when the oldest request will expire. The value is given in Unix epoch time. See [https://docs.digitalocean.com/reference/api/reference/#rate-limit](https://docs.digitalocean.com/reference/api/reference/index.html.md#rate-limit) for information about how requests expire. Response Schema: `application/json` `id` string required Example: `not_found` A short identifier corresponding to the HTTP status code returned. For example, the ID for a response returning a 404 status code would be "not_found." `message` string required Example: `The resource you were accessing could not be found.` A message providing additional information about the error, including details to help resolve it when possible. `request_id` string optional Example: `4d9d8375-3c56-4925-a3e7-eb137fed17e9` Optionally, some endpoints may include a request ID that should be provided when reporting bugs or opening support tickets to help identify the issue. ##### Response **200** ```json { "offset": 6 } ``` **400** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **401** ```json { "id": "unauthorized", "message": "Unable to authenticate you." } ``` **402** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **403** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **404** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **409** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **423** ```json { "id": "not_found", "message": "The resource you were accessing could not be found.", "request_id": "4d9d8375-3c56-4925-a3e7-eb137fed17e9" } ``` **429** ```json { "id": "too_many_requests", "message": "API rate limit exceeded." } ``` **500** ```json { "id": "server_error", "message": "Unexpected server-side error" } ``` **default** ```json { "id": "example_error", "message": "some error message" } ``` * * * ## GET Download a file or tar archive from the session's sandbox workspace. `/v2/harness-runtime/sessions/{session_id}/workspace/download` Streams the workspace payload back as `application/octet-stream` using chunked transfer encoding, followed by a fixed integrity footer. Response body layout: `` + `